Skip to content

Reduce repeated ACP session context - #5423

Open
wesbillman wants to merge 2 commits into
mainfrom
carl/issue5342-resume-spike
Open

Reduce repeated ACP session context#5423
wesbillman wants to merge 2 commits into
mainfrom
carl/issue5342-resume-spike

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

  • deliver legacy ACP standing context once per live session, committing delivery state only after a successful turn
  • send only new thread/DM event deltas on later turns, with fail-open behavior for missing IDs and failed/cancelled prompts
  • fence native steer delivery acknowledgements by ACP session identity so stale acks cannot poison replacement sessions
  • keep context hints truthful when a fetch contains only the triggering event versus history delivered earlier

Validation

The pre-push hook passed on exact pushed head 6a768f1bc80fe63c686acf8d730f177fff8add3c:

  • branch-skew
  • desktop-check
  • desktop-typecheck
  • desktop-test
  • rust-tests
  • desktop-tauri-checks

Focused regression tests were also run while iterating:

  • channel_prompt_commits_delivery_state_only_after_acp_success
  • in_flight_stale_native_steer_ack_cannot_update_replacement_session
  • thread/DM trigger-only versus previously-delivered context hint tests

Known limitations and follow-ups

A local Goose smoke timed out at session/new. This diff does not change code that executes at or before session/new; its earliest affected runtime behavior is delivery-state insertion after session creation succeeds. The smoke failure is therefore bounded as environmental or pre-existing, but no successful live-provider turn was obtained. Scripted ACP wire/lifecycle tests carry the regression coverage.

Durable process-restart/session resume remains out of scope for this slice of #5342. #5386 also remains separate pending upstream adapter support.

wesbillman and others added 2 commits August 9, 2026 11:31
Deliver legacy standing context once after a successful ACP prompt and
track live-session event delivery so later thread and DM prompts send
only deltas. Fence successful native steer acknowledgements by ACP
session identity across task-result races.

Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Distinguish history omitted because it was delivered earlier from a
trigger-only fetch, and add regression coverage for channel delivery
commit timing and stale in-flight steer acknowledgements.

Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
@wesbillman
wesbillman requested a review from a team as a code owner August 9, 2026 19:14
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