Uh oh!
There was an error while loading. Please reload this page.
fix: better defaults — Claude 1M context, Codex gpt-5.6, worktrees from origin main - #4240
Merged
Conversation
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sign up for freeto 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.
Fixes a batch of stale defaults in one pass. Folds in #3950 and #3958 (cherry-picked, with adjustments below).
1. Claude context window defaults to 1M for Opus and Fable
From #3950: the 200k default was a leftover guard from the subscription-gated 1M era (#1556) that outlived its rationale when subscription detection was removed (#1899).
Adjusted from the original PR: Sonnet 5 / Sonnet 4.6 stay at 200k default with 1M opt-in, matching Claude Code's own defaults (Opus and Fable are 1M-default there; Sonnet is not). Fable 5 and Opus 4.6 now default to 1M; Opus 4.8/4.7 were already hard-coded 1M with no toggle.
2. Codex default model follows the live catalog, preferring gpt-5.6-sol
DEFAULT_MODELwas a hardcoded"gpt-5.4"in contracts, and both web (getDefaultServerModel) and mobile (new-task flow) fell back to it or to the first list entry — which is why mobile kept landing on gpt-5.4.The Codex app-server's
model/listalready reportsisDefaultper model; we were dropping it. Now:ServerProviderModelcarries an optionalisDefault, populated from the Codex catalog.getDefaultServerModeland mobile's new-task model fallback pick the flagged default before falling back to first-in-list.DEFAULT_MODELfallback (only reachable with no live catalog) is bumped togpt-5.6-sol.3. New worktrees start from origin's default branch
From #3958, unchanged:
newWorktreesStartFromOrigindefaults on, web/mobile pre-select the repo default branch (origin/HEAD) as the worktree base instead of the currently checked-out branch, andlistRefsmarksorigin/<default>as default even when no local copy of the default branch exists (addresses the review finding on that PR).Testing
vp run -r typecheckclean🤖 Generated with Claude Code
Note
Medium Risk
Changes default behavior for existing users (worktrees from origin, Claude 1M on Opus/Fable, Codex model selection) and touches provider API model ID resolution and task creation metadata.
Overview
Refreshes stale product defaults across Claude, Codex, worktrees, and git ref listing so new tasks and API calls match current provider behavior.
Claude context window: Opus/Fable models that expose a context toggle now default to 1M (Sonnet stays 200k with 1M opt-in).
resolveClaudeContextWindowdrives both adapter context sizing and API model IDs ([1m]suffix), so unset selections pick up descriptor defaults instead of hard-coded 200k.Codex default model:
ServerProviderModelgains optionalisDefaultfrom Codexmodel/list; snapshot logic prefersgpt-5.6-sol→gpt-5.6-terra→ Codex’s own flag. Web, mobile new-task flow, and staticDEFAULT_MODEL/ git text-generation fallbacks use that flag before “first in list.”Worktrees:
newWorktreesStartFromOrigindecodes on for legacy settings. Mobile/web resolve start-from-origin from server settings when the draft never set it, only persist explicit user toggles, and queued tasks inherit the same resolved value. Branch auto-select and web worktree base branch prefer repo default refs, including when the default exists only asorigin/<branch>.Git VCS: Remote
origindefault branch is markedisDefaultwithout a local copy; default/current refs sort to the top of combined ref lists.Reviewed by Cursor Bugbot for commit 40a35ef. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Update default models to Claude 1M context, Codex gpt-5.6, and worktrees from origin main
DEFAULT_MODELtogpt-5.6-solandDEFAULT_GIT_TEXT_GENERATION_MODELtogpt-5.6-lunain model.ts; addsPREFERRED_DEFAULT_CODEX_MODELSranking['gpt-5.6-sol', 'gpt-5.6-terra']claude-fable-5andclaude-opus-4-8context window default to1m;resolveClaudeContextWindownow drives both model ID suffixing and context window resolution so defaults are honored without explicit user selectionapplyPreferredCodexDefaultModelto mark the highest-ranked available Codex model as default in the provider snapshot, overriding Codex's own default when a preferred model is availablenewWorktreesStartFromOriginserver setting default fromfalsetotrue; the mobile and web composers now resolve the effective value from server settings unless the user explicitly overrideslistRefsmarksorigin/<default>asisDefaultwhen no local copy exists and sorts current/default refs to the top of results, so worktree branch auto-selection and UI display prefer the repo defaultnewWorktreesStartFromOriginsetting will now getstartFromOrigin: trueby default; queued tasks inherit the resolved value rather than the draft valueMacroscope summarized 40a35ef.
Summary by CodeRabbit
New Features
Bug Fixes