Skip to content

feat(server): Claude Sonnet 5.5 and Codex 0.156 rollback - #242

Merged
TheDarkPhantom merged 3 commits into
mainfrom
feat/claude-sonnet-5-5
Sep 29, 2026
Merged

TheDarkPhantom merged 3 commits into
mainfrom
feat/claude-sonnet-5-5

Conversation

@TheDarkPhantom

Copy link
Copy Markdown
Owner

Problem

Fix

Claude Sonnet 5.5 (mirrors the fork's Opus 5.5 wiring, 2876a87)

  • New claude-sonnet-5-5 entry in ClaudeProvider.ts with upstream's sonnet-5 profile: effort low..max plus ultrathink, 200k default with 1M opt-in, no fast mode.
  • Gated on CLI 2.1.284. Its upgrade nudge now sits at the top of the ladder, above Opus 5.5 (2.1.280).
  • Extra High effort stays Extra High (added to the xhigh list in normalizeClaudeCliEffort).
  • Aliases sonnet-5.5, claude-sonnet-5.5, claude-sonnet-5-5. Bare sonnet and the default model stay on Sonnet 5, as upstream.
  • Marked New in the picker next to Opus 5.5.

Codex rollback (logic ported from pingdotgg#13481 and the helpers from pingdotgg#11338; no Effect upgrade, no protocol regeneration)

  • rollbackCodexThread reads the thread's historyMode. For paginated threads (the Codex 0.156 case) it lists turns with thread/turns/list and calls thread/revert { beforeTurnId } at the first turn it drops.
  • Older Codex compatibility: the fork's pinned protocol has no historyMode, thread/turns/list, or thread/revert, so older Codex versions do still exist in the wild. Threads that report no historyMode or legacy keep the count-based thread/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/revert rejects 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).
  • readThread now pages through thread/turns/list for paginated threads too.
  • The new methods go through client.raw.request, since the generated protocol lacks them.
  • The adapter's rollback error now names the Codex request that actually failed, where it used to always say thread/rollback.

Verification

  • vp test run on 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.
  • ProviderRegistry has 1 to 3 failures that change from run to run, all in OpenCode and Codex binaryPath re-probe tests. They're unrelated to this change, and the file is already known to be flaky.
  • tsgo --noEmit passes for apps/server, apps/web, packages/contracts, and packages/shared.
  • vp lint and vp fmt are clean on changed files. vp run check:avicode passes.

🤖 Generated with Claude Code

TheDarkPhantom and others added 3 commits September 30, 2026 01:17
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>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 29, 2026
@TheDarkPhantom
TheDarkPhantom merged commit a6700db into main Sep 29, 2026
12 checks passed
@TheDarkPhantom
TheDarkPhantom deleted the feat/claude-sonnet-5-5 branch September 29, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant