Codex Desktop wait_threads drops :true from completed assistant JSON while read_thread preserves it
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Environment
- Windows, Codex Desktop
26.901.2854.0. - Rechecked on 2026-09-04 using an existing completed local canary task.
- The same discrepancy was observed on Desktop
26.831.2377.0on 2026-09-02. - Affected first-party tools:
codex_app.wait_threadsandcodex_app.read_thread.
Reproduction and observed result
- Use a completed task whose final assistant message contains a JSON object with two boolean
truevalues. - Call
read_threadfor its latest completed turn and retain the agent message text, message ID and turn ID. - Call
wait_threadswith the same task ID andtimeoutMs: 0, without a previously consumed cursor. - Compare
latestAssistantMessage.textagainst the message returned byread_thread.
In the observed task, both tools return the same message ID and completed turn ID. The text from read_thread is 812 characters and parses as valid JSON. The text from wait_threads is 802 characters and fails JSON parsing.
The only differences are removal of the two literal :true substrings. Reduced illustration, with keys renamed:
read_thread: {"flag_one":true,"flag_two":true}
wait_threads: {"flag_one","flag_two"}
This illustration shows the affected fields only. The full comparison verified that all other characters were identical. The outer tool response remains valid JSON; the corruption affects the assistant-message string inside it. The wait response did not mark that string as truncated.
Expected behavior and impact
latestAssistantMessage.text should preserve the stored assistant message, including boolean values. If a summary is returned instead, expose it separately and identify it as a summary.
A coordinator relying on the wait result cannot parse the returned JSON and loses two reported boolean values, although the target task completed successfully. read_thread is a working fallback in this reproduction.
The exact transformation layer is unknown. A regression test comparing both tools' text for the same completed message would help prevent this.
Only sanitized reproduction details are included; no raw logs, private task content, account identifiers or local paths are attached.
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.
Research direction
Start by reproducing the completed-task comparison between codex_app.wait_threads and codex_app.read_thread with timeoutMs: 0, then trace both tool entry points to find where latestAssistantMessage.text is transformed. Add a regression test using the same completed message and verify that wait_threads preserves both boolean values and produces text matching read_thread.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100