From 2b9951b9c855160efe55c4f41613d8d0d195a256 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Sun, 15 Feb 2026 09:21:40 -0600 Subject: [PATCH] fix(agents): return 'inherit' instead of 'opus' for model resolution (#558) Claude Code's "opus" alias maps to a specific model version (claude-opus-4-1). Organizations that block older opus versions while allowing newer ones see agents silently fall back to Sonnet. By returning "inherit" instead, agents use whatever opus version the user has configured in their session. Co-Authored-By: Claude Opus 4.5 --- get-shit-done/bin/gsd-tools.js | 6 ++++-- get-shit-done/references/model-profile-resolution.md | 6 ++++-- get-shit-done/references/model-profiles.md | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/get-shit-done/bin/gsd-tools.js b/get-shit-done/bin/gsd-tools.js index 688c39936..a7be1efbc 100755 --- a/get-shit-done/bin/gsd-tools.js +++ b/get-shit-done/bin/gsd-tools.js @@ -1347,7 +1347,8 @@ function cmdResolveModel(cwd, agentType, raw) { return; } - const model = agentModels[profile] || agentModels['balanced'] || 'sonnet'; + const resolved = agentModels[profile] || agentModels['balanced'] || 'sonnet'; + const model = resolved === 'opus' ? 'inherit' : resolved; const result = { model, profile }; output(result, raw, model); } @@ -3509,7 +3510,8 @@ function resolveModelInternal(cwd, agentType) { const profile = config.model_profile || 'balanced'; const agentModels = MODEL_PROFILES[agentType]; if (!agentModels) return 'sonnet'; - return agentModels[profile] || agentModels['balanced'] || 'sonnet'; + const resolved = agentModels[profile] || agentModels['balanced'] || 'sonnet'; + return resolved === 'opus' ? 'inherit' : resolved; } function findPhaseInternal(cwd, phase) { diff --git a/get-shit-done/references/model-profile-resolution.md b/get-shit-done/references/model-profile-resolution.md index 6b7481b41..4e41aab9e 100644 --- a/get-shit-done/references/model-profile-resolution.md +++ b/get-shit-done/references/model-profile-resolution.md @@ -20,13 +20,15 @@ Look up the agent in the table for the resolved profile. Pass the model paramete Task( prompt="...", subagent_type="gsd-planner", - model="{resolved_model}" # e.g., "opus" for quality profile + model="{resolved_model}" # "inherit", "sonnet", or "haiku" ) ``` +**Note:** Opus-tier agents resolve to `"inherit"` (not `"opus"`). This causes the agent to use the parent session's model, avoiding conflicts with organization policies that may block specific opus versions. + ## Usage 1. Resolve once at orchestration start 2. Store the profile value 3. Look up each agent's model from the table when spawning -4. Pass model parameter to each Task call +4. Pass model parameter to each Task call (values: `"inherit"`, `"sonnet"`, `"haiku"`) diff --git a/get-shit-done/references/model-profiles.md b/get-shit-done/references/model-profiles.md index 870db8dd2..3efd46713 100644 --- a/get-shit-done/references/model-profiles.md +++ b/get-shit-done/references/model-profiles.md @@ -71,3 +71,6 @@ Verification requires goal-backward reasoning - checking if code *delivers* what **Why Haiku for gsd-codebase-mapper?** Read-only exploration and pattern extraction. No reasoning required, just structured output from file contents. + +**Why `inherit` instead of passing `opus` directly?** +Claude Code's `"opus"` alias maps to a specific model version. Organizations may block older opus versions while allowing newer ones. GSD returns `"inherit"` for opus-tier agents, causing them to use whatever opus version the user has configured in their session. This avoids version conflicts and silent fallbacks to Sonnet.