Error running remote compact task: Fatal error - Codex
Quick fix
Turn Remote Compaction off in Codex settings and use local compaction, working around this protocol conversion defect.
Symptom
Section titled “Symptom”Error running remote compact task: Fatal error: remote compaction v2 expected exactly one compaction output item, got 0 from 2 output itemsWhen handling context compaction, the Codex Responses API strictly expects the response to contain exactly one output item of `type: "compaction"`. With a third-party Chat Completions provider such as DeepSeek or MiniMax, cc-switch converts and forwards the request but the third-party API returns only ordinary summary text.
When converting a Chat Completions response back into the Responses format, cc-switch currently produces only ordinary `message` items and cannot produce the special `compaction` item Codex needs, so parsing fails. Some compaction requests may also bypass the translation pipeline and hit `/responses` directly, producing a 404.
In the Codex client settings, find and turn off the Remote Compaction option.
Make sure Local Compaction is enabled so Codex reduces context locally, bypassing the cc-switch remote protocol conversion defect.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 4 real issues
- Why do ordinary conversations work while only context compaction errors?
- An ordinary conversation response maps naturally onto the Responses API `message` type, while context compaction needs a special `compaction` output item — semantics cc-switch does not yet convert and wrap locally.
- Is there a way to fix it without turning remote compaction off?
- Turning remote compaction off is the only workaround today. A proper fix needs an official cc-switch update to wrap the `compaction` item correctly, or an official endpoint that natively supports the Responses API.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.