Plan mode: add a "clear context & implement plan" action
Problem
After I finish a planning session, I almost always want the same thing. I want to keep the plan, drop all of the back and forth planning discussion, and start implementing with a clean slate. Today this is a manual routine every single time, and it is not even a clean one.
- The planning conversation gets long and noisy, so I do not want to carry it into implementation.
- Because of that, each time I have to ask the model to write a handoff prompt. This is a self contained summary of the plan that a fresh session can act on without the prior context.
- Then I run
/clear, paste that handoff prompt back in, and finally start implementing.
I write that handoff step by hand on every single round. It is repetitive, and it also burns tokens generating a summary that the tool could persist on its own.
Request
At the end of plan mode, for example alongside the exit plan action, please add a single action such as "Clear context and implement plan" that does the following:
- Persists the approved plan, along with any handoff notes, automatically.
- Clears the conversation context.
- Starts a fresh implementation pass seeded only with that plan, with no hand written handoff prompt required.
Why
Carrying the full planning conversation into implementation wastes context and reduces focus. The current workaround forces a manual loop on every task: ask for a handoff prompt, clear, paste, then implement. A one click hand off from approved plan to fresh implementer would remove that loop entirely. For reference, OpenAI's Codex offers a similar "clear context and implement plan" option at the end of planning, and it works very well.
Workaround today
I ask the model for a handoff prompt, save the plan to a file, run /clear, then paste or prompt "implement PLAN.md". It works, but it is manual every time.
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
+1 on this. One angle worth adding: this already exists in the CLI but not in the desktop/web app, so it's a parity gap.
In the CLI, the plan-approval dialog offers it explicitly:
The app has no equivalent. When a plan takes 100K+ tokens to develop, all of that context carries into execution even though the finalized plan is the only thing implementation needs. That is wasted context budget on every plan-then-build cycle, which is most of them.
Ask: bring the CLI's "clear context and use auto mode" option to the plan-exit dialog in the desktop and web apps. The plan gets persisted, planning discussion is cleared, and implementation starts on a clean context. The behavior already exists on one surface, so this is mostly surfacing it in the app UI.
+1, this bit me too. I used Claude Code around the 2025/2026 turn and the plan-exit dialog always offered a "clear context" option — it quietly disappeared and there's nothing in the UI hinting it still exists as opt-in (
showClearContextOnPlanAccept: truein settings.json, only discoverable by reading closed issues like #38071, not the docs — see also #19426).For context on where this actually bites: planning backend features in a DDD-style monorepo (deciding aggregate boundaries, JSONB shape, API contracts before writing any code). Those planning conversations regularly run long — lots of back-and-forth to land on a plan I'm happy with — and that's exactly the noise I don't want carried into the implementation pass.
Even with the flag restored, the underlying request here stands on its own: a freshly-approved plan is precisely the moment your context is largest and noisiest, and that's when you want to hand off to a clean implementation pass. A bigger context window doesn't remove that need — it just means you can carry more noise before quality degrades, not that you should. Please make this a first-class, documented option again, not a hidden setting.
+1, I had to switch from the CLI due to new bugs that make multiple consecutive shell tool requests flow in asynchronously and end up getting accidentally/erroneously approved. I now miss this feature.