claude-code - 💡(How to fix) Fix Coherent plan mode: persist plans reliably and keep user-facing agent responsive when orchestrating background agents [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54209Fetched 2026-04-29 06:33:23
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Root Cause

Workarounds I've tried:

  • Skipping plan mode entirely and just prompting carefully — risks the agent jumping into code mode when I only wanted to plan.
  • Manually asking the agent to write the plan to a specific .md path at the end of a planning session — works inconsistently and adds friction every time.
  • Running planning in a separate CLI session from execution — which is exactly the case where the broken plan-saving step hurts the most, because the whole point is to hand the plan off.

Fix Action

Fix / Workaround

Workarounds I've tried:

  • Skipping plan mode entirely and just prompting carefully — risks the agent jumping into code mode when I only wanted to plan.
  • Manually asking the agent to write the plan to a specific .md path at the end of a planning session — works inconsistently and adds friction every time.
  • Running planning in a separate CLI session from execution — which is exactly the case where the broken plan-saving step hurts the most, because the whole point is to hand the plan off.

When orchestrating background agents there isn't a good workaround: plan mode currently makes the user-facing agent unable to answer the background agents' questions, so I either leave plan mode (and lose its benefits) or accept that the background agents stall.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Plan mode in the Claude Code CLI has two pain points that make it hard to use in real workflows.

  1. Saving the plan to a markdown file is unreliable. I often start a planning session in a separate CLI session to prepare new work, intending to capture the plan as a .md file I can hand off or resume later. For some reason this saving step consistently becomes a bottleneck — the plan either doesn't get written cleanly, gets written in unexpected places, or the flow around finalizing and persisting the plan feels broken. As a result I've stopped using plan mode in the CLI, but then I'm exposed to the opposite problem: without plan mode, the agent tends to slip into code/execution mode when I just wanted to think.

  2. Plan mode breaks the flow when one agent is orchestrating background agents. While the user-facing agent is in plan mode, it can't react to messages coming back from the background agents. Small decisions that the background agents need answered get deferred, the planning session stalls, and the parallelism that background agents are supposed to provide is wasted.

Proposed Solution

A "coherent plan mode" that:

  • Reliably persists the resulting plan to a markdown file (configurable path, sensible default, clear confirmation of where it was written) so plans created in a dedicated planning session can be picked up by another session or another agent.
  • Distinguishes "thinking/planning" from "executing code" without forcing the agent to be unresponsive. Specifically, when the user-facing agent is orchestrating background agents, plan mode should still allow it to receive and respond to messages from those background agents (at least small, non-destructive decisions) so the planning session doesn't block the workers.
  • Optionally a "resume from plan.md" entry point so a plan written in one session can be loaded into another session and executed/refined without copy-pasting.

Alternative Solutions

Workarounds I've tried:

  • Skipping plan mode entirely and just prompting carefully — risks the agent jumping into code mode when I only wanted to plan.
  • Manually asking the agent to write the plan to a specific .md path at the end of a planning session — works inconsistently and adds friction every time.
  • Running planning in a separate CLI session from execution — which is exactly the case where the broken plan-saving step hurts the most, because the whole point is to hand the plan off.

When orchestrating background agents there isn't a good workaround: plan mode currently makes the user-facing agent unable to answer the background agents' questions, so I either leave plan mode (and lose its benefits) or accept that the background agents stall.

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

No response

Additional Context

No response

extent analysis

TL;DR

Implement a "coherent plan mode" that reliably saves plans to markdown files and allows the user-facing agent to respond to background agents while in plan mode.

Guidance

  • Identify the root cause of the unreliable plan saving step, potentially related to file path configuration or confirmation of write location.
  • Consider implementing a configurable path for saving plans to markdown files, with a sensible default and clear confirmation of the write location.
  • Develop a mechanism to distinguish between "thinking/planning" and "executing code" modes, ensuring the agent remains responsive to background agents while in plan mode.
  • Explore adding a "resume from plan.md" entry point to load and execute/refine plans from previous sessions.

Example

No code snippet is provided due to the lack of specific technical details in the issue.

Notes

The proposed solution requires further technical specification and implementation details, which are not provided in the issue. The guidance provided is based on the problem statement and proposed solution.

Recommendation

Apply a workaround by manually asking the agent to write the plan to a specific .md path at the end of a planning session, although this is noted to be inconsistent and adds friction. A more robust solution would require implementing the proposed "coherent plan mode" features.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING