fix(codex): stop re-planning and stale cleanup abort after plan approval#72
Open
fix(codex): stop re-planning and stale cleanup abort after plan approval#72
Conversation
… and stop re-planning in agent mode - Track currentRunId per transport instance; pass it in cleanup() so the server only aborts the stream that actually finished, not a newer one that already started - Guard cleanup mutation server-side: skip abort when the provided runId doesn't match the active stream's runId (prevents plan-turn cleanup killing implement-plan) - Inject [AGENT MODE] instruction into the Codex prompt in agent mode so the model does not call PlanWrite or create a new plan during implementation - Hide AgentPlanTool in agent mode: PlanWrite tool calls render as a plain pill instead of the full plan card, keeping the plan UI plan-mode-only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
Summary
currentRunIdper transport and pass it incleanup()so the server only aborts the stream that finished, not a newer implement-plan stream that already startedshouldAbort = !runId || activeStream.runId === runIdto prevent the plan-turn cleanup from killing the implement-plan subscription[AGENT MODE]instruction into the Codex prompt in agent mode so the model does not call PlanWrite or re-plan during implementationAgentPlanToolis suppressed in agent mode — any PlanWrite call renders as a plain tool pill instead of the full plan card, keeping the plan UI plan-mode-onlyTest plan
🤖 Generated with Claude Code