Repository navigation
feat(server): Claude Sonnet 5.5 and Codex 0.156 rollback - #242
Merged
Merged
Conversation
Anthropic shipped Claude Sonnet 5.5 (claude-sonnet-5-5) in Claude Code CLI 2.1.284. Register it in the hardcoded Claude model list with the Sonnet 5 profile (effort low..max plus ultrathink, 200k default with 1M opt-in, no fast mode), gate it on CLI 2.1.284 with an upgrade nudge at the top of the ladder, keep Extra High effort, add its slug aliases, and mark it New next to Opus 5.5. The bare "sonnet" shortcut and the default model stay on Sonnet 5, as upstream (pingdotgg#14152). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ported from pingdotgg#13481 Codex 0.156 dropped thread/rollback, so undoing turns failed. Rollback now reads the thread's historyMode: paginated threads list their turns (thread/turns/list) and revert at the first dropped turn with thread/revert { beforeTurnId }. Legacy threads, which is every thread on Codex versions before paginated history (no historyMode, no thread/revert), keep the count-based thread/rollback. readThread pages through thread/turns/list for paginated threads too. The fork's generated protocol is not regenerated; the new methods go through raw requests. The adapter now names the Codex request that actually failed instead of always reporting thread/rollback. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
claude-sonnet-5-5, Claude Code CLI 2.1.284). Upstream added it in Add Claude Sonnet 5.5 to the model manifest pingdotgg/t3code#14152 via a model manifest the fork doesn't have, so the picker can't offer it.thread/rollback, so undoing turns in Codex threads fails there.Fix
Claude Sonnet 5.5 (mirrors the fork's Opus 5.5 wiring, 2876a87)
claude-sonnet-5-5entry inClaudeProvider.tswith upstream'ssonnet-5profile: effort low..max plus ultrathink, 200k default with 1M opt-in, no fast mode.2.1.284. Its upgrade nudge now sits at the top of the ladder, above Opus 5.5 (2.1.280).normalizeClaudeCliEffort).sonnet-5.5,claude-sonnet-5.5,claude-sonnet-5-5. Baresonnetand the default model stay on Sonnet 5, as upstream.Codex rollback (logic ported from pingdotgg#13481 and the helpers from pingdotgg#11338; no Effect upgrade, no protocol regeneration)
rollbackCodexThreadreads the thread'shistoryMode. For paginated threads (the Codex 0.156 case) it lists turns withthread/turns/listand callsthread/revert { beforeTurnId }at the first turn it drops.historyMode,thread/turns/list, orthread/revert, so older Codex versions do still exist in the wild. Threads that report nohistoryModeorlegacykeep the count-basedthread/rollback. This routes on the history mode Codex reports instead of trying revert and falling back on method-not-found. The reason: on Codex versions that have both methods,thread/revertrejects legacy threads with a normal request error, not method-not-found, so a try-and-fall-back approach would break those threads. Legacy threads on 0.156 can't be rolled back at all (upstream has the same limit).readThreadnow pages throughthread/turns/listfor paginated threads too.client.raw.request, since the generated protocol lacks them.thread/rollback.Verification
vp test runon CodexSessionRuntime, ClaudeAdapter, ProviderRegistry, CodexAdapter, shared model, and parseChangelog tests: every new test passes. These include paginated revert for 1/2/3/5 turns, the no-turns case, cursor cycles, the legacy rollback path, a surfaced rollback rejection, Sonnet 5.5 gating at 2.1.284/2.1.283, and xhigh kept.tsgo --noEmitpasses for apps/server, apps/web, packages/contracts, and packages/shared.vp lintandvp fmtare clean on changed files.vp run check:avicodepasses.🤖 Generated with Claude Code