fix: avoid replaying channel restart recovery turns#74687
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: merged restart-recovery work now handles the same channel restart problem with captured delivery contexts and visible failure notices, while this branch would conflict with current main and reintroduce a broad fail-closed policy. Canonical path: Keep the released captured-route restart recovery path from #86089, and route any remaining storage or migration cleanup through the newer restart-recovery route work instead of reviving this fail-closed branch. So I’m closing this here and keeping the remaining discussion on #86089. Review detailsBest possible solution: Keep the released captured-route restart recovery path from #86089, and route any remaining storage or migration cleanup through the newer restart-recovery route work instead of reviving this fail-closed branch. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows the restart-recovery decision path and tests cover captured-route delivery versus historical-route non-inference; I did not run tests because this was a read-only review. Is this the best way to solve the issue? No. The branch's broad channel-backed failure guard is no longer the best fix because current main persists explicit recovery route context, avoids historical route inference, and sends visible notices for unresumable cases. Security review: Security review cleared: The diff only changes agent restart-recovery logic and a unit test; I found no concrete security or supply-chain regression. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 66880a5d736c; fix evidence: release v2026.6.6, commit 4decdf6245a1. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
Describe the problem and fix in 2–5 bullets:
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
agentturn after restart. For externally delivered sessions, that can re-enter channel/session delivery state when the safer behavior is explicit manual recovery.Regression Test Plan (if applicable)
src/agents/main-session-restart-recovery.test.tsUser-visible / Behavior Changes
Channel-backed sessions that were interrupted during restart recovery now require manual recovery instead of hidden automatic replay. Non-channel resumable recovery behavior is unchanged.
Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
agentturn or marks the session for manual recovery.Expected
Actual
Evidence
Attach at least one:
Verification run locally:
node scripts/run-vitest.mjs run --config test/vitest/vitest.agents-core.config.ts src/agents/main-session-restart-recovery.test.ts --maxWorkers=1 --reporter dot— 6 passednode scripts/run-vitest.mjs run --config test/vitest/vitest.agents-core.config.ts src/agents/session-write-lock.test.ts --maxWorkers=1 --reporter dot— 24 passedpnpm exec oxlint src/agents/main-session-restart-recovery.ts src/agents/main-session-restart-recovery.test.ts— 0 warnings/errorsHuman Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations