What version of Codex is running?
codex-cli 0.42.0
Which model were you using?
gpt5-codex high
What platform is your computer?
Darwin 25.0.0 arm64 arm
What steps can reproduce the bug?
codex exec --json --dangerously-bypass-approvals-and-sandbox "remove README.md"
I then see the JSON output below and it hangs forever. Note that it also hangs without the --json flag, just you have less visibility that way.
What is the expected behavior?
Ideally tool calls are allowed, even the "dangerous" ones, when I use the "dangerous" flag. At least, it doesn't hang forever.
What do you see instead?
{"model":"gpt-5-codex","reasoning effort":"none","approval":"never","workdir":"/Users/dimfeld/Documents/cc/code","provider":"openai","sandbox":"danger-full-access","reasoning summaries":"auto"}
{"prompt":"remove README.md"}
{"id":"0","msg":{"type":"task_started","model_context_window":272000}}
{"id":"0","msg":{"type":"token_count","info":null,"rate_limits":{"primary":{"used_percent":1.0,"window_minutes":299,"resets_in_seconds":17719},"secondary":{"used_percent":3.0,"window_minutes":10079,"resets_in_seconds":562632}}}}
{"id":"0","msg":{"type":"agent_reasoning_section_break"}}
{"id":"0","msg":{"type":"agent_reasoning","text":"**Removing README.md file**"}}
{"id":"0","msg":{"type":"exec_approval_request","call_id":"call_xUmcDRt5Tpmm6hsvbAkJZcor","command":["bash","-lc","rm -f README.md"],"cwd":"/Users/dimfeld/Documents/cc/code"}}
And then it waits forever and you have to ctrl-c.
Additional information
No response
What version of Codex is running?
codex-cli 0.42.0
Which model were you using?
gpt5-codex high
What platform is your computer?
Darwin 25.0.0 arm64 arm
What steps can reproduce the bug?
codex exec --json --dangerously-bypass-approvals-and-sandbox "remove README.md"I then see the JSON output below and it hangs forever. Note that it also hangs without the
--jsonflag, just you have less visibility that way.What is the expected behavior?
Ideally tool calls are allowed, even the "dangerous" ones, when I use the "dangerous" flag. At least, it doesn't hang forever.
What do you see instead?
And then it waits forever and you have to ctrl-c.
Additional information
No response