You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mode switch Plan -> Code still behaves like Plan #10185
Linux 6.18.0-364.vanilla.fc43.x86_64 x86_64 unknown
What terminal emulator and version are you using (if applicable)?
No response
What issue are you seeing?
Start a session in Code mode.
Switch to Plan mode (shift‑tab).
Switch back to Code mode.
Ask for an execution command (e.g., “go”).
Observed: agent claims it’s still in Plan mode and refuses execution.
Workaround: shift‑tab to Plan and back fixes it.
• Execution is blocked in Plan Mode despite user saying go; must respond with a status update that
execution can't proceed until mode switches, without asking questions directly.
Preparing user confirmation prompt
Planning to request user confirmation to proceed with execution once mode switches, asking
explicitly to confirm running commands now.
• I’m still in Plan Mode, which forbids executing commands. Please switch me back to code mode
What steps can reproduce the bug?
Plan mode instruction injected at 2026‑01‑29T18:04:55.152Z (developer message
<collaboration_mode>).
Turn context later switches to Code mode at 2026‑01‑29T18:53:37.015Z (collaboration_mode:
{ mode: "code" }).
Despite that, at 2026‑01‑29T20:09:32.854Z the agent reasons “Execution is blocked in Plan Mode
…” and emits a request_user_input tool call and message stating it is still in Plan Mode.
@etraut-openai This looks like the same underlying issue as #9997 (Plan-mode instructions still influencing behavior after switching back to Code). This report has a nice timestamped repro; suggest consolidating the details into #9997 and closing this as a dup.
I investigated the collaboration mode templates and found the issue:
Plan mode template (codex-rs/core/templates/collaboration_mode/plan.md) states:
"You are in Plan Mode until a developer message explicitly ends it.
Plan Mode is not changed by user intent, tone, or imperative language."
Code mode template (codex-rs/core/templates/collaboration_mode/code.md) only says:
"you are now in code mode."
When switching Plan→Code, the Code mode instruction doesn't explicitly end Plan mode - it just announces Code mode. The model follows Plan mode's instruction to persist until an explicit end message.
Proposed Fix
Update code.md to explicitly end Plan mode:
Plan Mode is now ended. You are in Code mode.
You may now execute commands, edit files, and perform mutating actions.
This ensures the model receives an unambiguous signal that Plan mode rules no longer apply.
Repro Steps (from issue)
Start in Code mode
Switch to Plan mode (shift+tab)
Switch back to Code mode
Ask for execution → agent refuses, claims still in Plan mode
Note: I see @swordfish444 mentioned this may be a dup of #9997, which was marked as mitigated.
However, since the issue persists in 0.92.0, my analysis above might explain why the fix was incomplete - the code.md template still doesn't explicitly end Plan mode, so the model continues following Plan mode's instruction to persist "until a developer message explicitly ends it."
If this is indeed a regression or incomplete fix of #9997, the root cause analysis above may help identify what was missed.
Hey @0xdeafbeef have you noticed this on newer versions? I was unable to repro this even on v0.92.0 following your instructions:
Start a session in Code mode.
Switch to Plan mode (shift‑tab).
Switch back to Code mode.
Ask for an execution command (e.g., “go”).
Observed: agent claims it’s still in Plan mode and refuses execution.
Workaround: shift‑tab to Plan and back fixes it.
I worry the behavior is non-deterministic. Did it happen every time for you? Or only sometimes?
If non-deterministic than it may just be an issue with the code mode developer instructions (being too subtle) as @yuvrajangadsingh has suggested. But in the rollout of the thread you posted, it looked like the model was getting confused by repetitive insertion of the plan mode instructions, which makes me think there was some bug causing the plan mode instructions to be reinserted at the wrong times (in which case updating the code mode prompt wouldn't fix).
Hey @0xdeafbeef have you noticed this on newer versions? I was unable to repro this even on v0.92.0 following your instructions:
Start a session in Code mode.
Switch to Plan mode (shift‑tab).
Switch back to Code mode.
Ask for an execution command (e.g., “go”).
Observed: agent claims it’s still in Plan mode and refuses execution.
Workaround: shift‑tab to Plan and back fixes it.
I worry the behavior is non-deterministic. Did it happen every time for you? Or only sometimes?
Happened in some latest alpha from today. Also there is an issue when you switch plan -> code and it tries to use ask questions tool, but it's available only in a plan mode.
Also it pretty often just states that it's ready to impl plan and asks to manually switch to code mode.
I think that it's the problem of me doing several edit rounds in a single context window without using /new.
Plan mode is unchecked and it absolutely refuses to do anything. This is broken and it's very annoying. I just had it execute a plan half an hour ago and it worked fine, and the next plan now it doesn't work at all
Workaround: I force closed codex and restarted and no dice. I copied its plan to a new chat and it's now not in plan mode.
Plan mode is unchecked and it absolutely refuses to do anything. This is broken and it's very annoying. I just had it execute a plan half an hour ago and it worked fine, and the next plan now it doesn't work at all
Workaround: I force closed codex and restarted and no dice. I copied its plan to a new chat and it's now not in plan mode.
Confirming that I'm also occasionally experiencing this issue with GPT-5.5 in Codex Version 26.513.31313 (2867). Repeated prompts and restarting Codex didn't fix it for me either, but turning plan mode on, sending a short prompt (to ignore the message), then turning plan mode off again seemed to fix it.
@charley-oai / @etraut-openai I am also facing this issue; I am trying to try out codex having used claude code for months but this is not a great start for sure.
Still a thing in May 2026.
Plan mode is unchecked and it absolutely refuses to do anything. This is broken and it's very annoying. I just had it execute a plan half an hour ago and it worked fine, and the next plan now it doesn't work at all
Workaround: I force closed codex and restarted and no dice. I copied its plan to a new chat and it's now not in plan mode.
Confirming that I'm also occasionally experiencing this issue with GPT-5.5 in Codex Version 26.513.31313 (2867). Repeated prompts and restarting Codex didn't fix it for me either, but turning plan mode on, sending a short prompt (to ignore the message), then turning plan mode off again seemed to fix it.
For me, sometimes the session does not refresh correctly and the answer takes forever. If I restart codex, I can see the answer correctly displayed (as if it answered in the background way earlier), but it will be locked in plan mode if I exit codex within plan mode.
still reproduces on 0.151.0. the plan template in the shipped binary still reads "You are in Plan Mode until a developer message explicitly ends it", and i can't find any corresponding plan-ending developer message in there, which is the same mechanism i traced in january.
to be precise about what i checked: that's the template text in the 0.151.0 binary, not a fresh TUI repro, so treat it as evidence the mechanism is unchanged rather than a full reproduction.
#10270 covered the template side but was closed under the no-unsolicited-contributions policy, so nothing about that path has moved since.
Activity
swordfish444 commentedon Jan 29, 2026
@etraut-openai This looks like the same underlying issue as #9997 (Plan-mode instructions still influencing behavior after switching back to Code). This report has a nice timestamped repro; suggest consolidating the details into #9997 and closing this as a dup.
yuvrajangadsingh commentedon Jan 30, 2026
Root Cause Analysis
I investigated the collaboration mode templates and found the issue:
Plan mode template (
codex-rs/core/templates/collaboration_mode/plan.md) states:Code mode template (
codex-rs/core/templates/collaboration_mode/code.md) only says:When switching Plan→Code, the Code mode instruction doesn't explicitly end Plan mode - it just announces Code mode. The model follows Plan mode's instruction to persist until an explicit end message.
Proposed Fix
Update
code.mdto explicitly end Plan mode:This ensures the model receives an unambiguous signal that Plan mode rules no longer apply.
Repro Steps (from issue)
Thread ID:
019c0aed-2138-7b32-acf5-f3fb174f84f3yuvrajangadsingh commentedon Jan 30, 2026
Note: I see @swordfish444 mentioned this may be a dup of #9997, which was marked as mitigated.
However, since the issue persists in 0.92.0, my analysis above might explain why the fix was incomplete - the
code.mdtemplate still doesn't explicitly end Plan mode, so the model continues following Plan mode's instruction to persist "until a developer message explicitly ends it."If this is indeed a regression or incomplete fix of #9997, the root cause analysis above may help identify what was missed.
fix: explicitly end Plan mode when switching to Code mode
charley-oai commentedon Feb 2, 2026
Hey @0xdeafbeef have you noticed this on newer versions? I was unable to repro this even on v0.92.0 following your instructions:
I worry the behavior is non-deterministic. Did it happen every time for you? Or only sometimes?
charley-oai commentedon Feb 2, 2026
If non-deterministic than it may just be an issue with the code mode developer instructions (being too subtle) as @yuvrajangadsingh has suggested. But in the rollout of the thread you posted, it looked like the model was getting confused by repetitive insertion of the plan mode instructions, which makes me think there was some bug causing the plan mode instructions to be reinserted at the wrong times (in which case updating the code mode prompt wouldn't fix).
0xdeafbeef commentedon Feb 2, 2026
Happened in some latest alpha from today. Also there is an issue when you switch plan -> code and it tries to use ask questions tool, but it's available only in a plan mode.
Also it pretty often just states that it's ready to impl plan and asks to manually switch to code mode.
I think that it's the problem of me doing several edit rounds in a single context window without using /new.
charley-oai commentedon Feb 3, 2026
Hopefully this PR will improve: #10545
0xdeafbeef commentedon Feb 3, 2026
0xdeafbeef commentedon Mar 2, 2026
looks fixed
7 remaining items
firecrauter commentedon May 4, 2026
I just hit what looks like the same bug.
I asked Codex to create a plan, but I forgot to type
/planor enable the Plan Mode switch manually.After that:
<proposed_plan>and</proposed_plan>tags.To work around it, I had to fork from the previous message and retry the request, this time explicitly enabling Plan mode.
Note: I did not try sending another message with Plan Mode on active, then off.
Environment:
justingolden21 commentedon May 7, 2026
Still a thing in May 2026.
Plan mode is unchecked and it absolutely refuses to do anything. This is broken and it's very annoying. I just had it execute a plan half an hour ago and it worked fine, and the next plan now it doesn't work at all
Workaround: I force closed codex and restarted and no dice. I copied its plan to a new chat and it's now not in plan mode.
thevans101 commentedon May 18, 2026
Confirming that I'm also occasionally experiencing this issue with GPT-5.5 in Codex Version 26.513.31313 (2867). Repeated prompts and restarting Codex didn't fix it for me either, but turning plan mode on, sending a short prompt (to ignore the message), then turning plan mode off again seemed to fix it.
dsinghjassal commentedon May 21, 2026
@charley-oai / @etraut-openai I am also facing this issue; I am trying to try out codex having used claude code for months but this is not a great start for sure.
dsinghjassal commentedon May 21, 2026
Thanks for the workaround.
mecattaf commentedon Jul 21, 2026
still happening on latest gpt 5.6 sol max btw
alvinccli commentedon Jul 24, 2026
For me, sometimes the session does not refresh correctly and the answer takes forever. If I restart codex, I can see the answer correctly displayed (as if it answered in the background way earlier), but it will be locked in plan mode if I exit codex within plan mode.
fhsec commentedon Aug 9, 2026
This happens with 5.6 Sol on the GUI App still, restarting the app solves it.
F1xGOD commentedon Sep 1, 2026
still same issue, GUI and CLI 5.6 sol, 0.151.0, wth, will they fix this??
yuvrajangadsingh commentedon Sep 1, 2026
still reproduces on 0.151.0. the plan template in the shipped binary still reads "You are in Plan Mode until a developer message explicitly ends it", and i can't find any corresponding plan-ending developer message in there, which is the same mechanism i traced in january.
to be precise about what i checked: that's the template text in the 0.151.0 binary, not a fresh TUI repro, so treat it as evidence the mechanism is unchanged rather than a full reproduction.
#10270 covered the template side but was closed under the no-unsolicited-contributions policy, so nothing about that path has moved since.
tonxxd commentedon Sep 24, 2026
Also happening to me on codex desktop
26.915.31945lucky13820 commentedon Sep 27, 2026
I have the same issue with codex cli, i can't switch off plan mode with /plan. And i didn't turn in on myself either.
XAheli commentedon Oct 22, 2026
+1 same thing happening in codex cli 0.155.0
etraut-openai commentedon Nov 15, 2026
We will be deprecating plan mode soon, so we don't plan to make any new investments in it.