Codex App Server 0.145.0: tool-enabled turns never emit turn/completed after all tool results are finalized
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- backend-api-design, devtools
Research direction
Start with the sanitized reproducer codex-0145-tool-loop-minimal.py and reproduce the App Server 0.145.0 tool-enabled turn over stdio. Trace the App Server lifecycle and tool-loop handling after the final accepted tool result; done means the server emits turn/completed without waiting for the 420-second timeout, while preserving the successful final output and artifact.
Written by the indexing model from the issue text.
Description
What version of Codex CLI is running?
0.145.0
What subscription do you have?
ChatGPT Plus
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Ubuntu 24.04.4 LTS, x86_64 (Hetzner VPS)
What terminal emulator and version are you using (if applicable)?
Terminal.app on macOS via SSH to the Ubuntu VPS; Codex App Server uses stdio transport.
Codex doctor report
What issue are you seeing?
Codex App Server 0.145.0 systematically fails to emit turn/completed for tool-enabled turns.
Across 10 reproduced tool-enabled runs, Codex successfully performed the requested work, all tool requests received matching accepted results, the final assistant output was observed, and the expected task artifact was created and valid.
However, turn/completed was never emitted. The client remained waiting until the 420-second turn timeout.
Observed in all affected runs:
- Tool requests/results fully matched
- Outstanding tool requests: 0
- Outstanding server requests: 0
- Outstanding approvals: 0
- Outstanding protocol items: 0
- Final assistant output observed: yes
- Valid output artifact produced: yes
turn/completedobserved: no
We also ran a matched test changing only the thread mode:
- ephemeral=true: affected
- ephemeral=false: affected
Two previously successful no-tool/minimal App Server control runs did emit turn/completed.
This appears to be a systematic tool-enabled turn completion/lifecycle issue rather than a model-quality failure.
What steps can reproduce the bug?
-
Start Codex App Server 0.145.0 over stdio.
-
Create a thread and start a tool-enabled turn using
gpt-5.6-sol. -
Let the model perform normal workspace operations such as file reads/writes and shell/test commands.
-
For every tool request, return the corresponding valid tool result to App Server.
-
Continue processing events until:
- all tool requests have matching accepted results,
- there are no outstanding tool/server/approval requests,
- the final assistant output is received,
- the requested output artifact has been created successfully.
-
Continue waiting for the normal terminal lifecycle event:
turn/completed
Expected:
turn/completed is emitted after the tool-enabled turn has fully finished.
Actual:
turn/completed is never emitted. The client remains waiting until the configured 420-second timeout.
We reproduced this across 10 tool-enabled runs.
A controlled test changing only the thread mode produced the same result:
ephemeral=true→ noturn/completedephemeral=false→ noturn/completed
A sanitized minimal reproduction is available in:
codex-0145-tool-loop-minimal.py
What is the expected behavior?
After all tool requests have received matching results and no protocol obligations remain, the tool-enabled turn should complete normally and Codex App Server should emit:
turn/completed
The client should not remain blocked waiting until timeout once:
- all tool items are finalized,
- the final assistant output has been produced,
- and no further client action is required.
Additional information
Additional evidence from our controlled investigation:
- Affected tool-enabled runs: 10
- Successful no-tool control runs: 2
- Tool request/result matching: proven
- Outstanding protocol obligations at terminal state: 0
- Final assistant output observed: yes
- Valid task artifact produced before timeout: yes
turn/completedabsent: reproduced systematically- Same behavior with both
ephemeral=trueandephemeral=false
Environment:
- Ubuntu 24.04.4 LTS, x86_64
- Codex CLI / App Server 0.145.0
- Model: gpt-5.6-sol
- App Server transport: stdio
- Turn timeout used for observation: 420 seconds
The client does not appear to owe any additional protocol action when the stall occurs: all observed tool results have been accepted and no outstanding tool, server, approval, or protocol items remain.
We have prepared sanitized supporting evidence and a minimal pseudocode reproducer. No credentials, authentication tokens, private reasoning content, or user data are included.
Defect classification from our investigation:
SYSTEMATIC_TOOL_ENABLED_TURN_COMPLETION_FAILURE
Suspected component:
Codex App Server 0.145.0 lifecycle/tool-loop handling.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·