claude-code - 💡(How to fix) Fix Plan-mode reminder is not re-injected on direct mode-toggle or session resume; auto-mode reminder degrades to abbreviated form on re-entry [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#55171Fetched 2026-05-01 05:44:24
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

The harness's mode reminders (the <system-reminder> blocks that tell the model "Plan mode is active" / "Auto mode is active") are emitted inconsistently across mode transitions. In several reproducible cases, the UI shows plan mode but no plan-mode reminder is injected into the model's turn, so the model continues to behave according to the last mode reminder it actually received (auto). This is the mechanism behind the user-visible symptom "auto mode keeps clobbering plan mode even after I switch back."

Error Message

I asked the model to report, on each turn, exactly which <system-reminder> blocks it received. Sequence:

Root Cause

The plan-mode reminder text says: "This supersedes any other instructions you have received." That precedence rule only helps when both reminders are present in the same turn. When the plan reminder is silently omitted (bugs 1, 3) and the last reminder the model saw was auto, the model has no in-band way to know it should be in plan mode — the UI state and the model state diverge. From the user's perspective this looks like "auto mode is clobbering plan mode."

Bug 4 compounds the risk by making the durable safety clauses context-dependent.

RAW_BUFFERClick to expand / collapse

Summary

The harness's mode reminders (the <system-reminder> blocks that tell the model "Plan mode is active" / "Auto mode is active") are emitted inconsistently across mode transitions. In several reproducible cases, the UI shows plan mode but no plan-mode reminder is injected into the model's turn, so the model continues to behave according to the last mode reminder it actually received (auto). This is the mechanism behind the user-visible symptom "auto mode keeps clobbering plan mode even after I switch back."

Environment

  • Claude Code CLI (Opus 4.7, 1M context)
  • macOS (darwin 25.4.0), zsh
  • No custom mode-related hooks; default settings
  • When first enabling auto mode in this session (after clearing settings.json), I explicitly chose the "enable auto mode" option, not the "make it my default mode" option. So this is not a case of auto being persisted as a default that overrides per-session plan toggles — auto was activated for the session only, and the bugs below describe what happens when toggling back out of it.

Observed behavior

I asked the model to report, on each turn, exactly which <system-reminder> blocks it received. Sequence:

TurnAction taken in UIPlan reminderAuto reminderSkills listOther turn-1 boilerplate
1Fresh session, plan modefullyesyes (deferred tools, MCP, claudeMd)
2Toggled to autofull (6-clause)
3Toggled directly back to planmissing
4No toggle
5No toggle
6Quit, relaunched, resumed session, in plan modemissingyes
7Cycled-through (shift-tab) until back at planfull
8Exited plan → auto"Exited Plan Mode"abbreviated
9Toggled directly back to planmissing

Bugs identified

1. Direct toggle auto → plan does not re-inject the plan-mode reminder (turns 3, 9)

After the auto-mode reminder has fired in a session, a single direct toggle from auto back to plan flips the UI flag but does not produce a <system-reminder> containing the plan-mode block on the next user turn. The model's most recent in-band signal remains the auto-mode reminder, so it continues to behave under auto-mode rules even though the user believes plan mode is active.

2. Cycling-through to plan does re-inject the reminder (turn 7)

When the user cycles through modes (shift-tab through plan → normal → auto → plan, or similar) and lands on plan, the full plan-mode reminder is emitted. This confirms the bug is specific to the direct-toggle code path, not to plan-mode reminder emission in general.

3. Session resume into plan mode does not re-inject the plan-mode reminder (turn 6)

After quitting and relaunching claude and resuming a session that was in plan mode, the resume path re-emitted the available-skills reminder but did not re-emit the plan-mode reminder. The model has no in-band confirmation that plan mode is active on the resumed turn.

4. Auto-mode reminder degrades to a context-dependent abbreviated form on re-entry (turn 8)

The first time auto fires in a session, the model receives the full 6-clause auto-mode block including:

  • "Do not take overly destructive actions"
  • "Avoid data exfiltration"

When auto fires a second time in the same session (after a plan→auto re-entry), it is replaced by a one-liner:

Auto mode still active (see full instructions earlier in conversation). Execute autonomously, minimize interruptions, prefer action over planning.

This is a silent guardrail degradation: the abbreviated form drops the destructive-actions and data-exfiltration clauses entirely, and the back-reference is only as durable as the conversation window. After a /compact or context eviction that drops the original turn, the model loses those guardrails with no warning.

Why this matters

The plan-mode reminder text says: "This supersedes any other instructions you have received." That precedence rule only helps when both reminders are present in the same turn. When the plan reminder is silently omitted (bugs 1, 3) and the last reminder the model saw was auto, the model has no in-band way to know it should be in plan mode — the UI state and the model state diverge. From the user's perspective this looks like "auto mode is clobbering plan mode."

Bug 4 compounds the risk by making the durable safety clauses context-dependent.

Suggested fixes

  1. Re-emit the plan-mode reminder on every transition into plan mode, regardless of source mode or transition path (direct toggle, cycle-through, session resume).
  2. Always emit the full auto-mode block on every transition into auto mode, rather than relying on a back-reference to an earlier turn.
  3. Optionally: emit the current mode reminder on session resume as part of the standard resume payload, alongside the skills list.

Reproduction

  1. Start claude in plan mode. Ask: "what system reminders did you get this turn?"
  2. Toggle to auto. Ask the same question.
  3. Toggle directly back to plan (single shift-tab, not a full cycle). Ask the same question. — Plan reminder should be present; in current behavior it is missing.
  4. Cycle modes until you land on plan. Ask the same question. — Plan reminder is present.
  5. Quit claude, relaunch, resume the session. Ask the same question. — Plan reminder is missing.
  6. Toggle to auto a second time. Ask the same question. — Auto reminder is the abbreviated form, not the full 6-clause block.

extent analysis

TL;DR

Re-emitting the plan-mode reminder on every transition into plan mode and always emitting the full auto-mode block can resolve the inconsistencies in mode reminders.

Guidance

  • Re-emit the plan-mode reminder on every transition into plan mode, regardless of the source mode or transition path, to ensure the model receives the correct mode instructions.
  • Always emit the full auto-mode block on every transition into auto mode, rather than relying on a back-reference to an earlier turn, to maintain consistent safety clauses.
  • Consider emitting the current mode reminder on session resume as part of the standard resume payload to ensure the model is aware of the current mode after a session restart.

Example

No specific code snippet is provided as the issue is more related to the logic of mode transitions and reminder emissions rather than a specific code block.

Notes

The provided steps for reproduction can help verify the presence of the bugs and test the effectiveness of the suggested fixes. Ensuring consistent mode reminders is crucial for maintaining the intended behavior of the model and preventing mode inconsistencies.

Recommendation

Apply the workaround by re-emitting the plan-mode reminder on every transition into plan mode and always emitting the full auto-mode block, as this directly addresses the identified bugs and ensures consistent mode behavior.

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

claude-code - 💡(How to fix) Fix Plan-mode reminder is not re-injected on direct mode-toggle or session resume; auto-mode reminder degrades to abbreviated form on re-entry [1 comments, 2 participants]