openai / openai/codex

Codex Desktop wait_threads drops :true from completed assistant JSON while read_thread preserves it

Open
#42,831 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug subagent
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.0 on 2026-09-02.
  • Affected first-party tools: codex_app.wait_threads and codex_app.read_thread.

Reproduction and observed result

  1. Use a completed task whose final assistant message contains a JSON object with two boolean true values.
  2. Call read_thread for its latest completed turn and retain the agent message text, message ID and turn ID.
  3. Call wait_threads with the same task ID and timeoutMs: 0, without a previously consumed cursor.
  4. Compare latestAssistantMessage.text against the message returned by read_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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.