Skip to content

got 0 from 0 output items: Codex remote compaction failed

Quick fix

Upgrade CC Switch to v4.0.0 or later. If you cannot upgrade yet, disable Remote Compaction and use Codex local compaction.

Error output
Error running remote compact task: Fatal error: remote compaction v2 expected exactly one compaction output item, got 0 from 0 output items

After CC Switch converted Codex remote compaction requests into third-party Chat Completions requests, the old response converter generated only regular output items such as message, not the single compaction item required by Codex. Codex therefore detected 0 valid compaction results. Regular conversations do not depend on this special item, so they could still work normally.

Different upstream providers produced other variants: returning 1, 2, or 3 regular output items; receiving 404/401 because the compaction request incorrectly accessed /responses; or, with upstream providers such as MiniMax, apparently succeeding without actually reducing the context. The maintainer confirmed that v4.0 rewrote the bridging logic to convert compaction requests into summary turns and return exactly one compaction item.

  1. Upgrade CC Switch to v4.0.0 or later. The maintainer confirmed that this version includes the new bridging logic between Codex remote compaction and Chat Completions upstream providers.

  2. After upgrading, trigger Codex context compaction again. If it still fails, record the CC Switch version and logs, then report the issue.

  3. If you cannot upgrade yet, disable Remote Compaction so Codex uses local compaction.

ToolCodex
Version受影响:3.16.2 - 3.19.1;修复:4.0.0+
PlatformsWindowsmacOS
Is there a temporary workaround?
Yes. Disable Remote Compaction so Codex uses local compaction. A user in the issue confirmed that this works.
Why do regular conversations work while only context compaction fails?
Regular conversations can map message between the Responses API and Chat Completions API. Remote compaction requires the response to contain exactly one special compaction item, which the old converter did not generate.
Why does it still fail after setting the upstream format to Chat Completions?
In older CC Switch versions, compaction requests might not fully pass through the format translation path used for regular conversations, or the response converter might still generate only regular output items. This can cause errors such as 0 compaction items or a 404 from the /responses endpoint.

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.