Skip to content

fix: observe owned background terminals between turns - #614

Open
naiba wants to merge 1 commit into
agentclientprotocol:mainfrom
naiba:fix/background-terminal-idle-observation
Open

naiba wants to merge 1 commit into
agentclientprotocol:mainfrom
naiba:fix/background-terminal-idle-observation

Conversation

@naiba

@naiba naiba commented Oct 12, 2026

Copy link
Copy Markdown

Problem

Background terminal reconciliation currently depends on turn/item events. Once the parent is idle, a shell can disappear from the native terminal list without its ACP task being reconciled.

Change

Keep one unref-ed, serialized observation timer for known tasks and their owning threads. Respect app-server replacement/disposal fences; stop polling when tasks disappear. This does not start model turns or inject completion prompts.

Validation

  • 32 async-task tests passed, including idle reconciliation, no overlapping requests, disposal, rejected observation retry, and cessation after removal.
  • Typecheck and build passed.
  • Full local Bun suite passed without retries: 1493 passed, 36 pre-existing skipped (before the additional idle-removal regression, which passed separately). Full-suite run also applied separate fixture-cleanup and workspace-symlink test fixes; neither is included in this PR.
  • A previous Node full-suite run failed in existing deep JSON serialization and native initialization tests; these are not represented as passing.

Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>

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.

1 participant