Skip to content

feat: keep tool calls working for a short time after backgrounding on iOS (#139) - #142

Draft
V3RON wants to merge 1 commit into
mainfrom
issue-139-keep-tool-calls-working-for-a-short-time
Draft

V3RON wants to merge 1 commit into
mainfrom
issue-139-keep-tool-calls-working-for-a-short-time

Conversation

@V3RON

@V3RON V3RON commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Closes #139

What changed

Pending. Red tests for the iOS background window: the client holds OS background time after backgrounding and closes with closeForBackground() only when the time expires.

Acceptance criteria

# Criterion Test Tier
1 Backgrounding holds time, socket stays open, a call is answered testBackgroundingAnActiveSessionHoldsBackgroundTimeAndKeepsTheSocketOpen, testAToolCallArrivingWhileBackgroundTimeIsHeldIsAnsweredOnTheSameSocket unit (Swift)
2 In-flight call completes while time is held testACallInFlightWhenTheAppIsBackgroundedCompletesWhileBackgroundTimeIsHeld unit (Swift)
3 Expiry closes for background, cancels in-flight, no reconnect, time ends after the close event, foreground resumes testWhenBackgroundTimeExpires... (2), testBackgroundTimeEndsOnlyOnceTheCloseEventHasArrived, testWindowEndCloseEmitsNoErrorEvent, testForegroundingAfterTheWindowEndsResumesTheSession unit (Swift)
4 Foreground before expiry ends time, same socket testForegroundingBeforeTheWindowEndsEndsTheBackgroundTimeAndKeepsTheSameSocket unit (Swift)
5 No session asks for no time; disconnect, destroy, lost socket end it testBackgroundingWithoutAnActiveSessionAsksForNoBackgroundTime, testDisconnectEndsTheBackgroundTime, testDestroyEndsTheBackgroundTime, testALostSocketEndsTheBackgroundTime unit (Swift)
6 Device E2E on the simulator pending device
7 Docs and changelog pending n/a

E2E evidence

pending

Checklist

  • CHANGELOG.md has an entry under Unreleased (writing-changelog skill), or the change is not user-visible
  • User-facing docs updated for every surface the change touches (writing-user-docs skill), or the change is not user-visible
  • No new import past a module's index.ts; no new direct node:* I/O outside an adapter
  • Simplification checklist from the architecture skill applied, exceptions explained above
  • docs/ARCHITECTURE.md updated if a surface it describes changed

Out of scope

none

Status

Implement: red tests committed Review: pending E2E: pending Ready: no

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep tool calls working for a short time after backgrounding on iOS

1 participant