Skip to content

fix(acp): recover queued turns and keep metadata readable - #3988

Merged
kev1n77 merged 2 commits into
openBitFun:mainfrom
kev1n77:fmy/acp-queue-recovery
Nov 18, 2026
Merged

kev1n77 merged 2 commits into
openBitFun:mainfrom
kev1n77:fmy/acp-queue-recovery

Conversation

@kev1n77

@kev1n77 kev1n77 commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Restore in-flight ACP execution after frontend reload and resume draining queued messages when that turn settles.
  • Persist turns reconstructed from the execution journal, including text received before reload.
  • Keep model, configuration, commands and context-usage reads responsive while a prompt holds the ACP protocol receiver. Publish metadata updates through a session-scoped snapshot.

Type and Areas

Bug fix. ACP client, Desktop session restore and Web UI queue handling.

Verification

  • ACP Rust client execution, metadata concurrency and session-options tests passed (16).
  • Focused Web UI tests for the queue, message dispatch, replay, event handling, persistence and store passed (597).
  • node tests/e2e/scripts/run-acp-queue-recovery.mjs passed all 10 scenarios on local macOS Desktop with a controlled Agent over real ACP stdio. It verifies reload recovery, durable output, queue ordering, metadata updates, cancellation, duplicate admission and reconnect.
  • Remote workspace, Remote Connect, Peer Device Mode, Detached Dispatch and live ACP providers were outside the test coverage.

Reviewer Notes

The restore response adds an optional ACP execution-authority marker. The metadata snapshot stays in memory and the protocol receiver remains serialized. AI-assisted implementation and verification.

kev1n77 added 2 commits November 18, 2026 14:17
Restore the running ACP turn and drain queued input after frontend reload. Allocate a storage index for replayed turns so the original response is saved.

Serve session metadata from a watch snapshot while a request owns the protocol receiver. Cover live updates, queue ordering and reconnects in the controlled ACP fixture.
Return session execution state and the shared event projection from the host effects port. Convert protocol-specific snapshots in the production adapter so the session application stays independent of the ACP crate.
@kev1n77
kev1n77 merged commit 6eb0688 into openBitFun:main Nov 18, 2026
13 checks passed
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