Conversation
Keep raw ACP steer delivery in cancellation cleanup, expose ambiguous delivery as a safe new-turn retry, and preserve newer dispatch ownership. Model: gpt-5.6-sol Signed-off-by: Dante <duanjl.china@gmail.com>
Declare and round-trip the delivery-unknown marker so HistoryWriter cannot strip the UI recovery contract. Model: gpt-5.6-sol Signed-off-by: Dante <duanjl.china@gmail.com>
Model: gpt-5.6-sol Signed-off-by: Dante <duanjl.china@gmail.com>
Model: gpt-5.6-sol Signed-off-by: Dante <duanjl.china@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Closes #666
Problem / pressure
Stopping a turn while an acknowledged ACP steer was still awaiting its application verdict could leave the steer waiter and
pending_applyhistory state behind. Treating the timeout as non-delivery would be unsafe because the provider might already have accepted the guidance; leaving only process-local cleanup was also unsafe because a daemon restart or late history replica could dispatch the same steer again.Summary
Visual explanation
sequenceDiagram participant UI participant CLI participant ACP participant Meta as Session metadata UI->>CLI: steer B CLI->>ACP: submit B UI->>CLI: Stop turn A CLI--xCLI: abort local application wait CLI->>ACP: retain/drain raw delivery alt ACP proves refusal CLI->>CLI: requeue B without rewriting newer pointer C else accepted or delivery unknown CLI->>Meta: persist exact-id terminal fence for B CLI->>CLI: mark visible B failed/unknown if present end Note over CLI,Meta: restart or late history cannot dispatch fenced BBefore / after
Test plan
pnpm --dir apps/cli exec vitest run tests/session-execution-service.test.ts src/session/session-dispatch-logic.test.ts— 126 tests passed, including unresolved delivery with the history row absent.pnpm --dir packages/components exec vitest run tests/undelivered-user-turn.test.ts— 8 tests passed.pnpm --dir packages/shared exec vitest run tests/history-steer-provenance.test.ts— 3 tests passed.pnpm run docs check— passed with existing repository warnings only.pnpm run lint:fast— 0 errors (473 existing warnings).pnpm run lint:i18nand code-collab import/platform/public boundary guards — passed.git diff --check upstream/main— passed.Context handoff
Instructions for reviewing agents
steerSessionLockedthrough cancellation finalization, then verify the exact-id fence in shared activation logic, dispatch watcher, and the UI retry derivation.AgentSteerNotDeliveredErrorand to retain a bounded terminal fence rather than adding a second mutable dispatch queue.Authoring context
Original user prompt
Show original prompt