Repository navigation
v0.6.2 — keep Codex conversations whole
Claude Code 2.1.285 can send Codex requests using first-party features that assume the server remembers the conversation. The stateless gateway previously accepted those requests, so later turns could reach Codex with only the newest message. This release makes the gateway refuse unsupported stateful requests through Claude Code's native fallbacks, restoring full-history requests.
Fixes
- Refuse Message Threads with
thread_unsupported_request, so Claude Code retries statelessly for that model while retaining threading for Claude models. - Refuse the mid-conversation-system betas with the native unknown-beta response, prompting the client to resend the classic request shape.
- Seed streamed input usage with an estimate, then replace it with the final upstream counts. Fully cached turns report one fresh token because Claude Code ignores zero when merging usage; this bounds the accounting discrepancy to one token rather than retaining the estimate.
- Separate consecutive reasoning-summary parts with a blank line.
- Always emit the model registry's
capabilitiesarray, including an empty array for offline models without reported effort levels, avoiding a native capability-check crash.
Compatibility
No Anthropic-model request is diverted to the gateway. Threads remain model-scoped, but the mid-conversation-system fallback is a shared session setting: after using a Codex model, Claude requests in that session also use the classic shape without the kept-reminder caching shortcut.
Upgrade patch-cc, restart the Codex gateway to load the bridge fixes, and re-bake with your usual selections to pick up the registry fix.
Validation
- GitHub CI passes on Python 3.11, 3.12, 3.13, and 3.14 for the release commit.
- Lint, source formatting, and mypy pass locally.
- Local HTTP probes exercise the real gateway with synthetic upstream responses, covering refusal behavior, streaming/non-streaming usage, and reasoning-summary separation.
- The actual Claude Code 2.1.285 usage merger, context reader, and accumulator agree on uncached, partially cached, and fully cached fixtures; the fully cached fixture is one token high in both context and running totals.
- Full corpus sweep completed with
patch-cc doctor, covering matcher checks, parsing, baking, and booting the patched builds. - The 0.6.2 wheel and source distribution build successfully and pass Twine metadata checks.