codex exec failing with & without update_plan

Resolved 💬 4 comments Opened Aug 7, 2025 by hejia-chipstack Closed Oct 27, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli-exec 0.16.0

Which model were you using?

gpt-5

What platform is your computer?

Darwin 24.5.0 arm64 arm

What steps can reproduce the bug?

codex exec "run update_plan tool with some smoke test"

What is the expected behavior?

update_plan tool should be run

What do you see instead?

[2025-08-07T18:49:35] codex

I’ll set up a tiny smoke-test plan, then mark it complete.
[2025-08-07T18:49:35] exec bash -lc "update_plan << 'EOF'
[
  {\"step\": \"Create smoke-test plan\", \"status\": \"in_progress\"},
  {\"step\": \"Verify update mechanism\", \"status\": \"pending\"},
  {\"step\": \"Finalize by completing plan\", \"status\": \"pending\"}
]
EOF" in /Users/chipstack/sandbox/codex
[2025-08-07T18:49:36] bash -lc "update_plan << 'EOF'
[
  {\"step\": \"Create smoke-test plan\", \"status\": \"in_progress\"},
  {\"step\": \"Verify update mechanism\", \"status\": \"pending\"},
  {\"step\": \"Finalize by completing plan\", \"status\": \"pending\"}
]
EOF" exited 127 in 648ms:
/opt/homebrew/Library/Homebrew/brew.sh: line 60: cannot create temp file for here document: Operation not permitted
/opt/homebrew/Library/Homebrew/cmd/shellenv.sh: line 18: /bin/ps: Operation not permitted
bash: line 1: update_plan: command not found

Additional information

I set include_plan_tool = true in config.toml but it doesn't work; Cursor tell me it's because ConfigToml doesn't has that field. It's hardcoded to true in tui, but cli doesn't have it.

Also, trying to use the CLI without plan_tool won't work either, because prompt.md is hardcoded to have that tool and model will try to use it.

View original on GitHub ↗

4 Comments

hejia-chipstack · 1 year ago

tui smoke test looks good:

user
Run some smoke test to update_plan tool

thinking
**Running smoke tests for tools**

I need to run some smoke tests to demonstrate the update_plan tool's usage. The 
environment is read-only and has network restrictions. So, I'll create a small p
lan and update it multiple times to showcase transitions. I'll provide concise p
reambles before each tool call, as the guidelines suggest. Since this doesn’t in
volve code changes but rather using update_plan, I won't have to run shell comma
nds, just calls to update_plan. I'll ensure to keep track of everything!**Creati
ng a smoke test plan**

I need to run smoke tests for the update_plan tool, which means I’ll be calling 
it multiple times to demonstrate updates. First, I'll initialize a plan with non
-obvious steps like initializing the smoke test plan, performing updates A and B
, and completing the smoke test. I'll ensure that only one step is in progress a
t a time. I’ll mark each step as completed before moving to the next until I cal
l update_plan one final time with everything marked as completed.**Planning the 
smoke test calls**

At the end, I need to set all steps as completed while ensuring there’s only one
 step in progress until everything's finished. I think I’ll require five total c
alls, but maybe I could do it with four if I update after step 1 and combine ste
ps 2 and 3. Since it's a smoke test, multiple calls are acceptable. I’ll prepare
 short preamble messages before calls, keeping them simple. An example could be:
 "Setting up a tiny plan to smoke-test update_plan." Then, I'll follow with, "Ma
rking step 1 complete and moving to step 2."**Implementing the plan updates**

I’ll start by marking the steps in the update_plan tool: First, I’ll initialize 
the smoke test plan with step 1 in progress, and the others pending. Then, I’ll 
call update_plan to complete step 1 and set step 2 in progress. For the third ca
ll, I’ll complete step 2 and set step 3 in progress. I can combine the last two 
calls so that I mark step 3 as completed and step 4 in progress, followed by the
 final call to mark everything as completed. Time to implement this!

codex
Setting up a tiny plan to smoke-test update_plan.

📋 Updated to do list [░░░░░░░░░░] 0/4
  ⎿ □ Initialize smoke test plan
    □ Perform update A
    □ Perform update B
    □ Complete smoke test

thinking
**Updating progress**

I need to mark step 1 as completed and let everyone know that step 2 is in progr
ess. It makes sense to provide a little preamble to give context to the update. 
This way, everyone is clear about where we are in the process, and it keeps the 
communication smooth. I want to make sure that I’m being thorough in my updates 
to avoid any confusion later on.

codex
Marking step 1 complete and moving to step 2.

📋 Updated to do list [███░░░░░░░] 1/4
  ⎿ ✔ Initialize smoke test plan
    □ Perform update A
    □ Perform update B
    □ Complete smoke test

codex
Completing step 2 and advancing to step 3.

📋 Updated to do list [█████░░░░░] 2/4
  ⎿ ✔ Initialize smoke test plan
    ✔ Perform update A
    □ Perform update B
    □ Complete smoke test

codex
Wrapping up: finish step 3 and finalize.

📋 Updated to do list [████████░░] 3/4
  ⎿ ✔ Initialize smoke test plan
    ✔ Perform update A
    ✔ Perform update B
    □ Complete smoke test

📋 Updated to do list [██████████] 4/4
  ⎿ ✔ Initialize smoke test plan
    ✔ Perform update A
    ✔ Perform update B
    ✔ Complete smoke test

codex
Smoke test complete. Plan created, updated through steps, and finalized.

Token usage: total=4364 input=3264 (+ 38214 cached) output=1100 (reasoning 704)
hejia-chipstack · 1 year ago

https://github.com/openai/codex/pull/1793
@easong-openai @bolinfest I just realized there is already a related PR; Should this be re-opened?
I think at least CLI should work with update_plan either fully on or off. Currently it's kinda half-on and degrading performance

jjallaire · 11 months ago

We've also observed that include_plan_tool does nothing in exec mode (nor does the include_apply_patch_tool).

Following the code, it looks like when these two values are defaulted to None here: https://github.com/openai/codex/blob/main/codex-rs/exec/src/lib.rs#L149. There is then no way for them to be set to anything else because load_with_cli_overrides() (https://github.com/openai/codex/blob/main/codex-rs/core/src/config.rs#L390) parses them into ConfigToml which does not have these values defined (https://github.com/openai/codex/blob/main/codex-rs/core/src/config.rs#L390).

To the extent that more recent models can make good use of the plan and apply patch tools this makes exec mode considerably underpowered compared to what it could be for more complex tasks.

@easong-openai in closing that PR you said "I think we're just going to kill it given upcoming releases." -- does this imply that another fix for plan mode working in exec mode is in the works?

etraut-openai contributor · 10 months ago

include_plan_tool has been removed, so closing this issue.