Error running remote compact task error - Codex
Quick fix
Upgrade cc-switch to v3.12.0 or later. It adds forwarding support for the Codex /responses/compact route in the local proxy and can resolve 404 or 502 errors.
Symptom
Section titled “Symptom”Error running remote compact task: unexpected status 404 Not Found: Unknown error, url: http://127.0.0.1:15721/v1/responses/compactIn cc-switch v3.11.x and earlier, the local proxy (default port 15721) did not forward requests to the `/v1/responses/compact` endpoint in the OpenAI Responses API. When the Codex CLI's remote compaction feature triggered the `/compact` command, the local proxy intercepted the request and returned a 404 Not Found or 502 Bad Gateway error. This was fixed in v3.12.0 by adding forwarding logic for that route.
Upgrade cc-switch to v3.12.0 or later. The maintainer recommends testing v3.12.3 if the issue persists.
Restart cc-switch and Codex CLI, then run the `/compact` command in the terminal again to perform remote context compaction.
If you cannot upgrade yet, turn off the local proxy in cc-switch's Proxy tab so Codex can connect directly to a relay service that supports the Responses API as a temporary workaround.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 3 real issues
- Why does remote compaction work after turning off the cc-switch proxy?
- With the local proxy off, Codex sends requests directly to the relay service (such as CPA or New API). Since major relay services support the `/v1/responses/compact` endpoint, this bypasses the route interception defect in older cc-switch versions.
- What should I do if the error persists after upgrading to v3.12.0?
- The maintainer said to submit a new issue if the problem persists on v3.12.3. Make sure you fully restart the cc-switch process after upgrading.
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.