[Bug] Plan mode state changes don't emit system reminders, causing agent desynchronization

Resolved 💬 3 comments Opened Apr 28, 2026 by tionkje Closed May 1, 2026

Bug Description
Title: Plan mode silently desyncs — agent acts as if exited while user expects it active

Repro:

  1. User enters plan mode.
  2. Agent writes plan, calls ExitPlanMode.
  3. System reminder fires: ## Exited Plan Mode + ## Auto Mode Active.
  4. Agent acts (correct).
  5. User flips plan mode back on via UI shortcut/toggle (no explicit text in transcript).
  6. Next user message arrives WITHOUT a Plan mode is active system reminder — at least none visible to the agent in the next turn.
  7. Agent proceeds to edit files freely, thinking it's still in auto mode.

Expected: every user-driven plan-mode toggle should fire a Plan mode is active/Exited Plan Mode system reminder on the very next agent turn, so the agent can't drift.

Actual: the agent's last-seen "Auto Mode Active" reminder persists in its mental model. Subsequent edits violate plan mode but neither agent nor harness raises an alarm until the user notices.

Impact: silent rule-bypass; trust erosion. Especially bad when the user toggles plan mode mid-session as a "stop and let's design first" signal — exact moment they need the agent to obey.

Environment Info

  • Platform: linux
  • Terminal: tmux
  • Version: 2.1.121
  • Feedback ID: 25b98b0c-5d4b-492e-a9b1-5fbb4d60ecfb

Errors

[{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T06:32:50.328Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗