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 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
Model Profile Resolution
Resolve model profile once at the start of orchestration, then use it for all Task spawns.
Resolution Pattern
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
Default: balanced if not set or config missing.
Lookup Table
@~/.claude/get-shit-done/references/model-profiles.md
Look up the agent in the table for the resolved profile. Pass the model parameter to Task calls:
Task(
prompt="...",
subagent_type="gsd-planner",
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
- Resolve once at orchestration start
- Store the profile value
- Look up each agent's model from the table when spawning
- Pass model parameter to each Task call (values:
"inherit","sonnet","haiku")