Private live plan file for Plan Mode
Open 💬 5 comments Opened Apr 23, 2026 by mstawick
What variant of Codex are you using?
CLI
What feature would you like to see?
This is a summary of my discussion with codex. Inspired by Claude Code feature that I've found very useful when working in plan mode.
---
Feature Request: Private Live Plan File In Plan Mode
Codex Plan Mode should maintain an up-to-date Markdown copy of the current working plan in a private, untracked agent directory, separate from the repo workspace. The user should be able to open this file in an external editor with auto-refresh while Codex remains in Plan Mode.
Problem
Long plans are hard to read and review in terminal chat. Plan Mode currently blocks file writes, which is correct for repo safety, but it also prevents a useful read-only review workflow.
Proposed Behavior
- When Plan Mode is active, Codex writes the latest plan draft to a private local path, for example under $CODEX_HOME/plans/ or another agent-owned scratch directory.
- The file is never inside the repo unless explicitly requested after leaving Plan Mode.
- Codex shows the file path to the user.
- Updates happen whenever the plan changes.
- The file is clearly marked as temporary/private and not authoritative until emitted as <proposed_plan>.
- No repo-tracked files are changed, so this does not violate Plan Mode’s no-mutation guarantee.
Acceptance Criteria
- User can open the file in a GUI editor of choice and watch changes live.
- The file persists for the planning session.
- It is excluded from git and normal workspace mutation rules.
- It does not contain secrets unless already present in the plan text.
- The final <proposed_plan> remains the official handoff artifact.
Additional information
_No response_
5 Comments
Good issue. Additionally, the plan should be accessible post compaction to the models. Compaction is lossy and a plan is a strong point of alignment that should be preserved across this process. I'm currently manually writing it out to a file to avoid this issue.
The "private, untracked agent directory" + host-managed durable artifact pattern in this proposal is the same architectural slot as a feature request I just filed (#20138) for a session-scoped notes panel — both are host-owned, durable, separate from the repo workspace, and both serve as a stable reference that survives compaction.
Worth thinking about whether the underlying primitive (host-managed per-session durable artifacts) is the same and could be one subsystem with two surfaces (your plan file + a notes panel) on top of it, rather than two unrelated implementations. Not pushing a redesign on this issue — just noting the convergence in case maintainers want to look at them together.
Cross-linking for context.
need it so bad, only part where cursor plan mode is much better
I want to add a concrete failure case that makes this feature feel more like a reliability requirement than a convenience feature.
I have went through open and closed issues, tagging a few individuals who participated in those: @etraut-openai @fcoury-oai @aibrahim-oai
Summary
Plan Mode currently treats the generated plan as a transient chat/UI artifact rather than a durable handoff artifact. That breaks down when a planning session is long enough to trigger compaction, or when the user needs to review, refine, or hand off the plan before implementation.
The current
Yes, clear context and implementflow helps one narrow happy path, but it does not solve the more general problem this issue describes: the plan should exist as a host-owned durable artifact before any clear/compact/implement transition happens.Concrete failure case
I recently used Plan Mode for a non-trivial repository design session. The task was intentionally design-only:
/goalartifact laterThe plan was long and detailed. During or after planning, context compaction occurred before the plan was written to a file.
After leaving Plan Mode and asking the agent to write the plan artifact, the agent had to reconstruct the plan from the compacted context. The resulting file preserved the broad shape, but it lost important fidelity compared to the original plan shown in Plan Mode.
I then pasted the original plan text back into the session and asked the agent to reconcile the saved artifact. The agent found material differences and had to update the plan file.
That is the core problem: once compaction happens, the transcript is no longer a reliable source of truth for a detailed plan. If Plan Mode cannot write a durable plan artifact, the user has to manually copy/paste the plan or risk implementation from a lossy summary.
Why the current clear-context implementation is not enough
I inspected the current Plan Mode handoff behavior and the relevant merged implementation for
Yes, clear context and implement.The current design appears to keep the most recent proposed plan in live TUI state, currently under a field like:
and then passes that cached Markdown into the
ClearUiAndSubmitUserMessageflow when the user immediately selectsYes, clear context and implement.That helps if all of these are true:
But it is not a durable plan artifact.
In current source, the transcript state resets the cached proposed plan on a new task turn:
So continuing the conversation after the plan can clear the transient plan cache. The cache is also not model-visible after compaction, not exposed as a tool-accessible artifact, and not something a future resumed session can reliably read.
That means the current mechanism is a popup handoff buffer, not a preservation mechanism. Honestly it might be better utilized live during a planning session to reduce hallucination from compaction in-flight within the planning session itself.
Why this matters
For small plans, this may not matter much. For serious planning work, it matters a lot.
A good Plan Mode session often includes:
Those details are exactly the things most likely to be degraded by summarization. They are also exactly the things an implementation agent needs to preserve.
The user should not have to choose between:
The plan itself is the important artifact. It should be first-class.
Proposed behavior
When Plan Mode produces or updates a proposed plan, Codex should maintain a durable Markdown copy in a host-owned private location, for example:
or another session-scoped path under
CODEX_HOME.This file should be:
This preserves the no-workspace-mutation guarantee of Plan Mode while still giving the plan durable storage.
Desired UX
After a plan is produced, the Plan Mode completion UI should support actions like:
The important distinction is that clear-context implementation should be seeded from a durable saved plan artifact, not only from transient TUI state.
There should also be a way to view the current private plan path, such as:
Relationship to existing issues/features
This is related to, but not fully solved by, the existing clear-context handoff flow.
The merged clear-context implementation appears to submit the approved plan into a fresh thread from live TUI state. That is useful, but it does not address:
/goalThis issue is about a durable host-owned plan artifact, not about adding another manual compaction knob.
Acceptance criteria
A minimal version of this feature would satisfy:
Yes, clear context and implementuses the saved plan artifact as the source of truth.Stretch Goal -
/goal/goalis extremely powerful, I ship thousands of lines of code that not only conform to the plan, but the condition allows the agent to stay in the loop and have back pressure from tool enforcement like linters, formatters, static code analysis, tests, reinforcing directives in AGENTS.md in context, it is how you stop prompting and start making the tool do serious work. If you have standards, tooling, tests and good hygiene in the project and then have a model write the goal and condition against the durable plan file, the/goalfeature is GOATED. I was not surprised to see Claude Code immediately have it after you guys released it.If you could make Plan mode have another exit option where the planning agent, or another agent reviews and emits the right
/goal prompt | conditionthat matches and satisfies the plan and your AGENTS.md / Skills directives, the feature and your Plan mode would be unstoppable. No other harness has it, none of your competitors have it, all of you are talking about "loop engineering", iykyk.Why this fits Plan Mode
Plan Mode is already meant to produce an implementation contract before edits begin. Treating that contract as ephemeral chat text is the fragile part.
A private host-owned plan file keeps the safety property of Plan Mode while making the plan reliable enough for long, serious engineering tasks.
The key invariant should be:
Strong +1 on this. This is honestly one of the main reasons I still reach for Claude Code on planning-heavy work.
Once I’ve spent time refining and approving a plan, I want that exact plan saved somewhere durable—not left as chat text that can get blurred or lost during compaction. It should survive compaction, restarts, and handoffs, and the agent should always be able to find it again.
Codex is otherwise ridiculously good. If plans were file-backed and reliably carried into implementation, I could genuinely see myself dropping Claude Code entirely.