fix: stop Copilot continuation replay - #749
Conversation
|
Akash, this PR adds a Copilot-specific receipt for successful orchestration results and uses it to preserve the latest continuation or Part A - Direction: sound. I verified the problem against Part B - Review: request changes.
Non-blocking notes: expired receipt files are never garbage-collected, and the PR's "9/9" receipt-test count is not reflected by the seven added test blocks; the reproducible full totals are Part C - UX. The intended experience is consistent: Copilot should resume the latest steering position or active stage instead of restarting the forwarding loop, and ordinary conversational turns should end cleanly. There are no new commands, flags, stages, defaults, or intended breaking changes. The replacement prompts should preserve the existing forwarding-loop and non-narration language, and compaction needs an explicit recovery path. Verification: focused tests passed at |
Confirmed failure
The AI-DLC Copilot adapter ignored the successful orchestration result supplied by
postToolUse.When
agentStoplater fired, the core Stop hook ran a freshnext. That restarted steering at part 1, even when the current Copilot session had already received a newer continuation token orrun-stage.Confirmed Copilot contract
This fix follows GitHub's documented hook behaviour:
postToolUsefires after a successful tool call and exposes the model-facing tool result.agentStopfires when the main agent finishes and may returndecision: "block"with a reason to force another turn.userPromptSubmittedfires when the user submits a prompt.agentStopblocks and suppliesstop_hook_active.Source: https://docs.github.com/en/copilot/reference/hooks-configuration
Fix
next,continue, orreportdirective frompostToolUse.userPromptSubmitted.Safety boundary
The receipt only changes the guidance returned after the core Stop hook has already decided to block. It cannot:
Scope
Validation
git diff --checkpassedRelated issues