Codex App thread cannot continue: remote compact task fails with unknown variant `auto`
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.519.81530 (3178) Bundled agent version: codex-cli 0.133.0
What subscription do you have?
ChatGPT Pro
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
A long-running Codex App thread can no longer continue. When I send a new message in that existing thread, Codex enters automatic context compaction and then fails before the model can respond.
Full error:
Error running remote compact task: stream disconnected before completion: unknown variant auto, expected high or original at line 1 column 2199103
The issue repeats every time I try to continue the same thread. The thread is now effectively unusable from the Codex App UI.
Environment:
- Codex App version: Version 26.519.81530 (3178)
- Bundled agent version: codex-cli 0.133.0
- macOS Apple Silicon arm64
- Subscription: ChatGPT Pro
- Installed/reinstalled from the official macOS Apple Silicon Codex App DMG
I reinstalled the Codex App from the official Apple Silicon DMG, but the bundled agent still reports codex-cli 0.133.0.
What steps can reproduce the bug?
- Open an existing long-running Codex App thread with substantial prior context.
- Send a new message in that same thread.
- Codex begins automatic context compaction.
- The run fails before producing a model response.
- Repeating the same action in the same thread produces the same error:
Error running remote compact task: stream disconnected before completion: unknown variant auto, expected high or original at line 1 column 2199103
I tried:
- Quitting and restarting Codex App
- Killing Codex-related processes
- Reinstalling the official macOS Apple Silicon Codex App
- Reopening the same thread
- Sending a short follow-up message
The same thread still fails during automatic remote compaction.
What is the expected behavior?
Codex should successfully compact the existing thread context and continue the conversation.
If compaction fails, the app should recover gracefully, produce a compact checkpoint/summary, or allow the user to continue the thread without permanently wedging it.
A schema/version mismatch in the remote compaction task should not make an existing long-running thread unusable.
Additional information
I submitted feedback from the broken Codex thread.
Feedback ID:
019c6c45-2709-70b0-afac-7bc572e4451f
The app log also showed a feedback upload requestId:
c5d24fcc-3498-41ee-ab79-0a30a1b8c0ba
Local transcript extraction succeeded, which suggests the local transcript itself is readable.
Local transcript extraction results:
- JSON parse bad lines: 0
- Extracted messages: 683
- No
"detail":"auto"fields found - No
"image_detail":"auto"fields found
This suggests the failure may be occurring in remote compaction or server-side handling rather than from an obviously corrupted local transcript field.
I am not including project names, repository names, file paths, source code, transcripts, or full logs publicly because they may contain private information.
10 Comments
I've been getting this immediately after the last VSCode Codex extension update. (v26.519.32039) It's killing me because it eats up my credits and then fails to complete any actual work.
I got this on my first prompt just after getting on the pro plan.
Error running remote compact task: stream disconnected before completion: unknown variant
auto, expectedhighororiginalat line 1 column 63665Additional local evidence from another affected Codex Desktop thread:
/responses/compact200 OK, then the client reported:stream disconnected before completion: unknown variantauto, expectedhighororiginalat line 1 column 63665last_api_response_total_tokens=216527all_history_items_model_visible_bytes=1198099failing_compaction_request_model_visible_bytes=1203098model_context_window_tokens=Some(258400)"detail":"auto"or"detail": "auto"entries.detail=high.turn_contextentries withsummary=auto, including the turn immediately before the failing compaction.Inference: this does not look like an obvious local transcript corruption where an image detail was persisted as
auto. It may be a schema/version mismatch in the compact request or remote compact response handling, potentially involving a non-image field namedsummary=autobeing interpreted through a detail enum that only acceptshigh/original.Asked Codex to clean the whole thread. Worked
"Patched both broken transcripts:
fork transcript
original transcript
What changed:
Added "detail":"high" to every input_image object missing detail.
First pass fixed 147 direct user image entries.
Recursive pass fixed another 3,887 image entries inside compacted history records.
Validation now shows 4,079 image objects, all with detail=high, and no remaining detail:auto."
i appreciate the effort, @nostitos
can you please tell me the exact prompt you used?
It's a long thread, but what I would do is refer to that issue and say, FIX
The previous reply was :
The real fix needs to happen upstream in Codex’s compaction path.
The likely code fix is:
// wherever compact request image detail is deserialized/normalized
enum ImageDetail {
High,
Original,
Auto, // accept legacy/default value
}
Then normalize before sending/processing compact work:
match detail {
ImageDetail::Auto => ImageDetail::High,
other => other,
}
More robustly: /responses/compact should never wedge a thread on one unsupported enum. It should either accept auto, downgrade the image to high, drop the media from the compact input, or fall back to text-only compaction.
For your local thread, the safest workaround is not to edit Codex’s persisted state directly. Start a fresh thread and seed it with a compact handoff summary from the broken thread. That avoids triggering remote compaction over the 573 MB JSONL history.
Riskier local attempts:
Back up ~/.codex/sessions/...019d2a61...jsonl and ~/.codex/state_5.sqlite*.
Remove or redact old image-bearing history/events from the broken transcript.
Try reopening the thread so compact has no image payload to normalize.
I would not do step 2 unless you accept possible thread corruption. The cleaner fix is upstream: accept or normalize auto in compact image detail handling, plus add a regression test using a long thread with screenshots and automatic compaction.
First promot of thread :
what exactly did you do? open a new thread (in the SAME project) and then.. wrote this prompt? and it worked? it gave you something to solve the compaction error in the affected thread?
wait.. this is extremely confusing.. i don't understand what you did here
yes i open a new thread in the same project
The final prompt was just "Try to fix this locally."
<img width="751" height="678" alt="Image" src="https://github.com/user-attachments/assets/2743e189-e40f-4ee4-a54e-9292d29c0c4c" />
give me a single prompt for someone else trying to fix this