Skip to content

fix(server): honor custom Claude model options - #22792

Closed
juliusmarminge wants to merge 7 commits into
mainfrom
fix/issue-16672
Closed

juliusmarminge wants to merge 7 commits into
mainfrom
fix/issue-16672

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Problem

Custom Claude model Thinking selections were saved but omitted from SDK launch settings and process identity. Reproduced on main 74541bab17 through an isolated web dev server and real Claude Code 2.1.303. Explicit effort was already preserved by 76f57f9b84.

Change

Compile SDK launch settings and query identity with the existing instance-scoped custom model catalog, preserving built-in mappings and explicit effort fallback. Fixes #16672.

Scope and approval

Fixes #16672

Triaged bug via the automated issue flow.

Evidence index and commands · 10-row behavior matrix · 223-test log. Final head b3f248adfd adds test fixtures only; its production tree exactly matches the after-runtime SHA. Additional SDK harness fixtures cover custom defaults/validation, boolean options, and prompt effort on send/steer.

Verification

Two added behavioural regressions fail on main and pass with the fix: custom Thinking Off reaches SDK settings with effort High preserved; unchanged Thinking reuses a query, and both toggle directions replace it. The implementation step passed 223 focused tests, targeted lint/formatting, and server typecheck. Final independent reviews at the current head returned MERGE from Codex GPT-6.1 Sol and Claude Opus 5.5. Proof audit pass 2 returned SUFFICIENT for all 10 matrix rows and independently reproduced 223 passing tests. The Claude reviewer also checked base production against the new tests: 11 fail on base; two deliberate controls pass.

Evidence

Before After
Runtime transcript, SHA 74541bab17 Runtime transcript, SHA 95d01097c4

Real browser → isolated dev server → real Claude SDK. Custom dated Sonnet model saves effort High and Thinking Off. Before: query.open has effort high and showThinkingSummaries:true, no alwaysThinkingEnabled. After: false → true → false launches supply the selected boolean and keep effort high; all custom turns complete. The built-in Haiku control supplies alwaysThinkingEnabled:false before the fix; its upstream request returns unknown-provider.

No UI/render paths change. What else changed: custom option descriptors now supply parent launch, query identity, and prompt effort compilation; built-in mappings and existing subagent catalog behavior are retained.

Unverified: macOS, Windows, Electron shell, mobile, relay/tunnel, dynamic upstream catalog refresh; built-in Haiku upstream completion. This uses configured custom model capabilities, not the broader live catalog proposal in #16583.

Model/harness: GPT-6.1 Sol through Codex in T3 Code.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 21, 2026
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Oct 21, 2026
@juliusmarminge juliusmarminge changed the title fix(server): honor custom Claude Thinking selections fix(server): honor custom Claude model options Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.6 KiB 21.6 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.1 KiB +17 B (+0.3%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.3 KiB +17 B (+1.3%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: f6503f0 · PR result: 094c4ec · Source CI: failure

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@juliusmarminge juliusmarminge added via-triage Filed through npx t3 triage via-triage:gates-failing Triage fix: a land gate is failing (see PR body) labels Oct 21, 2026
@juliusmarminge juliusmarminge added bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed pr:ready Every gate passed; waits for Julius's land label and removed via-triage Filed through npx t3 triage via-triage:gates-failing Triage fix: a land gate is failing (see PR body) pr:gate-failed A land gate failed labels Oct 22, 2026
juliusmarminge and others added 2 commits October 29, 2026 22:41
# Conflicts:
#	apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
@juliusmarminge juliusmarminge added pr:gate-failed A land gate failed and removed pr:ready Every gate passed; waits for Julius's land label labels Nov 9, 2026
@Sharad-Patel1

Copy link
Copy Markdown
Contributor

Note

Generated by claude-opus-5-5
RESPONDING ON BEHALF OF SHARAD

This can be closed: it's already fixed on main. #27034 (2d0efd3) and #31717 (43cf364) pass the instance-scoped model catalog to compileClaudeModelSelection at every Claude call site this PR changes. #16672 was closed as completed on that basis.

The attached script applies this PR's 13 new adapter tests to current main without the PR's source change, and all 13 pass. It then removes the catalog argument from main's compileClaudeModelSelection calls, and 11 of the 13 fail. The other 2 are the PR's controls. So the tests exercise main's fix, not something this PR adds.

To reproduce, run bash prove-pr-22792.sh from a clean t3code checkout after vp i, with gh authenticated.

Result
PASS  #27034 is on main as 2d0efd3584
PASS  #31717 is on main as 43cf364dd2
PASS  main's makeClaudeQueryOptions compiles the selection against the scoped catalog
PASS  linked issue #16672 closed as completed by juliusmarminge
      Tests  13 passed | 380 skipped (393)
PASS  all 13 tests the PR adds pass on main with main's adapter
      Tests  11 failed | 2 passed | 380 skipped (393)
PASS  with the catalog removed from main's compile calls, 11 of the 13 tests fail (2 are the PR's controls)
VERDICT: CLOSE (already-fixed)

@juliusmarminge

Copy link
Copy Markdown
Member Author

Closing this draft: it has sat unfinished and #16672, which it was for, is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed size:S 10-29 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Custom Claude model effort and Thinking selections are saved but dropped at runtime

2 participants