fix(#1186): pin review sub-agent models to explicit IDs - #1189
fix(#1186): pin review sub-agent models to explicit IDs#1189fullsend-ai-coder[bot] wants to merge 2 commits into
Conversation
Replace `model: sonnet` with `model: claude-sonnet-4-6` in the five review sub-agent definitions (risk-assessment, intent-coherence, style-conventions, docs-currency, cross-repo-contracts). The `sonnet` alias resolves via ANTHROPIC_DEFAULT_SONNET_MODEL, which is set in the sandbox's .env.d/ but does not propagate to Agent-tool sub-agents. This caused model-not-available errors and retry delays that contributed to review timeouts. Add a diagnostic guard in pre-review.sh that checks the env source file for the ANTHROPIC_DEFAULT_SONNET_MODEL pin before the sandbox is created, surfacing mount or file issues early rather than letting them cascade into sub-agent model errors. Update the gcp-vertex.env bump comment to include sub-agent definitions in the coordinated update path. Note: pre-commit hooks could not complete (network access blocked for remote hook repos). Hooks were run directly: shellcheck passed on changed scripts. The post-script runs an authoritative pre-commit check. Closes #1186
|
🤖 Finished Review · ✅ Success · Started 1:43 PM UTC · Completed 2:05 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.90 |
|
Risk Assessment: moderate (2/5) DetailsTargeted bot-authored fix pinning model IDs in sub-agent frontmatter and adding a pre-review diagnostic guard; PROTECTED_PATH_COUNT=9 and moderate Tier 2 churn/multi-author signals in the skills directory are offset by zero security sensitivity, no dependency changes, easy rollback, and a well-scoped issue with clear acceptance criteria, preserving the prior score of 2. Previous runRisk Assessment: moderate (2/5) DetailsTargeted bot-authored bug fix replacing model aliases with explicit IDs across 9 configuration and script files; high protected-path count elevates Tier 1 but is offset by zero security sensitivity, no dependency changes, and a well-scoped issue with clear acceptance criteria fully addressed by the PR. |
ReviewFindingsMedium
Previous runReviewFindingsMedium
Low
Next steps:
|
|
🤖 Finished Fix · ✅ Success · Started 2:06 PM UTC · Completed 2:13 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.46 |
- Update SKILL.md risk-assessment dispatch docs to reference
claude-sonnet-4-6 instead of stale sonnet alias
- Add co-bump back-reference comment to each sub-agent model line
linking to env/gcp-vertex.env
- Harden diagnostic guard grep to reject commented-out lines and
empty assignments ('^[^#]*VAR=.\+' pattern)
Addresses #1189
🔧 Fix agent — iteration 1 (bot-triggered)Addressed all 5 review findings: updated stale model reference in SKILL.md, added co-bump comments to 5 sub-agent files, hardened diagnostic guard grep to reject comments and empty values. Protected-path finding acknowledged as informational (requires human approval). All 23 pre-review tests pass, bundled scripts verified in sync. Fixed (4):
Disagreed (1):
Tests: passed Decision points
Next steps:
|
|
🤖 Finished Review · ✅ Success · Started 2:14 PM UTC · Completed 2:53 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.33 |
Superseded by updated review
|
Closing: the premise in #1186 is not what happened. Sub-agents do inherit the sandbox env — verified 2026-09-05 by two real |
|
🤖 Finished Retro · ✅ Success · Started 8:07 PM UTC · Completed 8:18 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.74 |
Retro: PR #1189 — Closed without merge (incorrect premise)What happenedThe retro agent analyzed PR #1185's failed review run (sub-agents hitting model-not-available errors on Vertex AI) and filed issue #1186 at 13:22 UTC on Sept 5 with a diagnosis that sub-agents don't inherit sandbox env vars. PR #1181 had merged at 13:10 UTC — just 12 minutes earlier — adding the Review agent performanceThe review agent found several valid low-severity code quality issues (stale identifier, maintenance coupling, edge-case in grep) and correctly added Evidence for existing issues
Proposals filed |
Summary
model: sonnetwithmodel: claude-sonnet-4-6in 5 review sub-agent definitions (risk-assessment, intent-coherence, style-conventions, docs-currency, cross-repo-contracts). Sub-agents spawned via the Agent tool do not inherit.env.d/variables from the parent sandbox, so thesonnetalias falls to the CLI default (claude-sonnet-4-5@20250929) instead of the fleet-pinnedclaude-sonnet-4-6, causing model-not-available errors.env/gcp-vertex.envexists and containsANTHROPIC_DEFAULT_SONNET_MODELbefore sandbox creation. Surfaces mount or sourcing failures early as warnings instead of letting them cascade into sub-agent model errors mid-review.env/gcp-vertex.env.Testing
make check-bundleconfirms bundled script is in sync with sourcemake lint(skillsaw) passes with grade ACloses #1186
Post-script verification
agent/1186-pin-subagent-model-ids)b506757a64e08dfdf8aef13b92f43effd4a0d6c6..HEAD)