Repository navigation
Description
Problem
Sequant's .claude/agents/*.md definitions declare model: haiku for sequant-qa-checker, sequant-explorer, and sequant-testgen. Two issues compound:
- Upstream Claude Code currently ignores all
model:settings on subagents. Peranthropics/claude-code#43869(open since 2026-04-05), every documented mechanism — per-callmodel:parameter, agent frontmattermodel:, andCLAUDE_CODE_SUBAGENT_MODELenv var — is silently overridden. Subagents always run on the parent session's model. - #57718 (open) documents that even when the env var takes effect, it silently clamps the per-call
model:with no signal intool_resultor transcripts. Sequant users have no way to observe which tier their QA/spec/exec subagents are actually running on.
Net effect: a user with Opus as their main session model has been running every /qa quality check on Opus, paying Opus rates, while the agent definition advertises haiku. Verified empirically on this project — across 141 recent sessions, zero subagent spawns set model=haiku effectively; all inherited the parent (typically Opus).
Independent finding: sequant's declared tiers also diverge from community baseline
Sampled 144 agents in VoltAgent/awesome-claude-code-subagents (19.6k stars):
| Field | Coverage |
|---|---|
name, description, tools, model |
144 / 144 |
maxTurns, effort, permissionMode, isolation |
0 / 144 |
Model distribution: sonnet 71% (102/144), opus 17% (25/144), haiku 12% (17/144).
In the 04-quality-security category (closest analog to sequant-qa-checker): code-reviewer, architect-reviewer, security-auditor, compliance-auditor all use opus. qa-expert, debugger, performance-engineer use sonnet. Only accessibility-tester uses haiku.
Sequant's sequant-qa-checker: haiku is an outlier among community quality-check agents. Combined with the upstream routing bug, the declaration is both wrong and inert.
Current Behavior
.claude/agents/sequant-qa-checker.md→model: haiku(ignored upstream).claude/agents/sequant-explorer.md→model: haiku(ignored upstream).claude/agents/sequant-testgen.md→model: haiku(ignored upstream).claude/agents/sequant-implementer.md→ inherits (works correctly because no declaration).sequant/settings.jsonhasagents.modelfield, written bysrc/lib/settings.ts:827, with no runtime consumer anywhere insrc/or skills. Confirmed dead config.docs/features/plugin-distribution.md:94documentsagents.modelas a working override. It is not.- The same
haikuclaim appears in ~10 additional locations across docs, skill references, and source comments (see AC-3 audit).
Desired Behavior
Declared model tiers reflect (a) the community baseline for the task type and (b) what the agent would run on if Claude Code honored declarations. Users get a one-time sequant doctor warning explaining the upstream bug so they understand why behavior may not match declarations. All in-repo references to the model defaults are internally consistent.
Acceptance Criteria
AC-1: Realign declared model tiers
-
sequant-qa-checkermodel:haiku→sonnet(oropus— pick one; community split is 50/50 for code-review-adjacent agents, sonnet is the cheaper safer pick) -
sequant-explorermodel: keephaiku(community supports haiku for search/discovery) -
sequant-testgenmodel: keephaiku(stub generation is mechanical, low-judgment) -
sequant-implementermodel: unchanged (inherits) - Sync change across both agent directories:
templates/agents/*.md(source of truth — copied to user projects bysequant initviacopyTemplatesinsrc/lib/templates.ts:287) and.claude/agents/*.md(this repo's working copy). There is no third directory for agents. - Inline comment in each modified file:
# Note: per anthropics/claude-code#43869 this is currently a no-op; agent runs on parent's model
AC-2: sequant doctor upstream-bug warning
-
sequant doctoremits a one-line warning, unconditionally for now:WARN: Claude Code #43869 — subagent model: declarations are ignored. Agents currently run on parent model. - Warning links to Subagent model routing is broken — all mechanisms resolve to parent model (Opus) anthropics/claude-code#43869
- Warning is suppressible via
--quietflag or doctor settings - Implementation note for removal: no upstream API to detect the fix programmatically. Add a
// TODO: remove when anthropics/claude-code#43869 closessentinel next to the warning string; cleanup is a follow-up issue when Anthropic ships the fix. Do not attempt a runtime probe or version pin in this issue. - Snapshot test in
src/commands/doctor.test.tscovers the warning string + link
AC-3: Documentation audit (consolidated)
Sequant has ~10 in-repo locations that hardcode haiku as the subagent model and/or default. Update them so the codebase is internally consistent post-AC-1.
- Update
docs/features/declarative-agents.mdagent table (lines ~62-65), example frontmatter (~line 107), and any other mentions to match AC-1's tier choices - Add a "Known Upstream Limitations" subsection to
docs/features/declarative-agents.mdreferencing #43869 (model routing) and #57718 (silent override) - State that
.claude/agents/*.mdmodel fields are aspirational until upstream fixes land - Remove or fix the
agents.modelrow indocs/features/plugin-distribution.md:94(it documents a dead setting) - Update
docs/concepts/workflow-phases.md(line ~56 mentions "haiku sub-agents for cost-efficient stub generation") - Update
.claude/skills/_shared/references/subagent-types.mdand its 2 mirror copies intemplates/skills/_shared/references/andskills/_shared/references/(the AI-facing doc consulted during skill runs — agent table at ~lines 22-25, "Default: Use haiku unless..." rule at ~line 140, recommendation tables at ~lines 204-207). Mirror sync verified bynpx tsx scripts/check-skill-sync.ts. - Update
templates/skills/testgen/SKILL.mdand its 2 mirrors — strike or rewrite the fictional token-cost claim at ~lines 148-149 ("Without haiku: ~50K tokens. With haiku: ~5K tokens.") since haiku isn't honored upstream - Update
templates/skills/exec/SKILL.mdand its 2 mirrors —[model: haiku]parser logic (~lines 1539-1544) and inlinemodel="haiku"examples (~lines 1555, 1686, 1693) stay in place (will re-activate when #43869 lands) but receive a one-line# Note: model param inert per anthropics/claude-code#43869comment - Update
src/lib/settings.ts— doc-comment block at lines 51-52, Zod schema.default("haiku")at line 277,DEFAULT_AGENT_SETTINGSat lines 569-571, generatedsettings.jsoncomment at lines 826-827, and the internal markdown table at line 948. Keep the runtime default value (see AC-4) — only update the prose claiming it works. - Audit gate:
grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.tsreturns either updated tier claims or explicit "inert per #43869" annotations — no stale claims that haiku is the runtime model.
AC-4: Dead-config cleanup — keep with deprecation notice
Recommendation: keep AgentSettings.model in the schema. Removing it would fail Zod parse on existing user .sequant/settings.json files with "model": "haiku" already written by prior init runs — a silent breaking change.
- Keep
AgentSettings.modelfield insrc/lib/settings.tsand the Zod schema (don't remove) - Mark the field deprecated in the TypeScript doc comment (
@deprecated currently inert; see #43869) - When a user has set
agents.modelto a non-default value,sequant doctoradds a second-line note:Note: agents.model is currently inert (see #43869).(extends AC-2; doesn't duplicate it) - No migration of existing settings.json files needed (field still parses; value is just ignored at runtime, which matches today's reality)
AC-5: CHANGELOG entry
- Add an entry to
[Unreleased]inCHANGELOG.mdunder### Changedor### Fixed: one-line summary of the realignment + doctor warning, citing fix(agents): realign declared model tiers; document upstream routing bug #632 and upstream #43869. Required by/qa§10a CHANGELOG gate (feat(qa): wire CHANGELOG gate into §7 verdict algorithm so it actually blocks READY_FOR_MERGE #585).
Out of Scope
maxTurns/effortcaps — investigated against 144 community agents, zero use these fields. The practitioner pattern is structured prompts, not turn caps. Consider narrowing Add user-configurable agent overrides and graceful maxTurns handling #483 separately.- Wiring
agents.modelruntime override — would write code that does nothing until #43869 is fixed. Revisit when upstream lands. - Stripping the
[model: ...]parser inexec/SKILL.md— leaving it intact (with an inert-note comment) means it auto-reactivates when #43869 closes. Stripping would force a re-release. isolation: worktreeSDK feature — sequant uses its ownsrc/lib/worktree-isolation.ts(Evaluate built-in worktree isolation for /exec parallel agent groups #485 closed); insulated from #47548.
Verification
- After AC-1:
grep "^model:" templates/agents/*.md .claude/agents/*.mdshows updated tiers in both locations - After AC-2:
npx sequant doctor 2>&1 | grep -q '43869'(behavior check, not just source grep) - After AC-3:
grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.ts— every match is either (a) a current tier claim consistent with AC-1, or (b) an explicit "inert per #43869" annotation. No silent stale claims. - After AC-4: existing user
.sequant/settings.jsonfiles with"model": "haiku"still load without error; doctor surfaces the inert-field note when non-default - After AC-5:
[Unreleased]section of CHANGELOG.md mentions fix(agents): realign declared model tiers; document upstream routing bug #632 - After upstream #43869 lands: the
// TODOsentinel next to the doctor warning is the marker for follow-up cleanup
References
- Upstream: Subagent model routing is broken — all mechanisms resolve to parent model (Opus) anthropics/claude-code#43869 (model routing broken)
- Upstream: [BUG] Agent tool
modelparameter silently overridden by CLAUDE_CODE_SUBAGENT_MODEL — no signal in tool_result or transcript anthropics/claude-code#57718 (silent model override) - Community baseline: https://github.com/VoltAgent/awesome-claude-code-subagents (144 agents)
- Related: Migrate subagent patterns to declarative .claude/agents/ definitions #484 (declarative agents migration, closed)
- Related: Add user-configurable agent overrides and graceful maxTurns handling #483 (maxTurns/effort guardrails — open, consider narrowing scope per Out of Scope above)
- Related: feat(qa): wire CHANGELOG gate into §7 verdict algorithm so it actually blocks READY_FOR_MERGE #585 (CHANGELOG
/qa§10a gate)
Activity
admarble commentedon May 13, 2026
→ PROCEED — Realign declared model tiers + add doctor warning for upstream routing bug (#43869)
Workflow: spec → exec → qa
Command:
npx sequant run 632 -qLarge audit scope: AC-3 covers ~10 in-repo locations across
.claude/,templates/,skills/(3-dir sibling sync) plussrc/lib/settings.tsschema. AC-2 addssequant doctorwarning; AC-4 keepsagents.modelfield with@deprecatedto avoid breaking existing usersettings.json. -q recommended for breadth + breaking-change adjacency.Memory cross-reference: tracked in
project_upstream_subagent_model_bug.md.admarble commentedon May 13, 2026
Spec Analysis — #632
Complexity: Complex (5 top-level ACs, ~25 sub-checkboxes, 7+ directories)
AC Quality Check
All ACs are precise and measurable. Each top-level AC carries a verification recipe in the issue body's
## Verificationsection (grep baseline, doctor invocation, CHANGELOG inspection). No vague/unmeasurable patterns detected.One minor item: AC-1 first checkbox offers "sonnet or opus — pick one." This is a planner-time decision; resolved below in Open Questions.
Scope Assessment
Non-Goals: Captured explicitly under
## Out of Scope:maxTurns/effortcaps, wiringagents.modelas a runtime override, stripping the[model: ...]parser in exec/SKILL.md,isolation: worktreeSDK migration. Good scope hygiene.@deprecatedannotation)Verdict:⚠️ SCOPE_WARNING — large fan-out but each touch is shallow. Quality loop already enabled by /assess.
Splitting is not recommended: AC-3's audit-gate grep at the end (
grep -rn '\bhaiku\b' ...returns either updated or annotated) is what makes this work coherent. Splitting would invalidate the gate.Acceptance Criteria
AC-1: Realign declared model tiers
Verification: Manual Test (grep
^model:across both agent dirs)Scenario: Given
templates/agents/*.mdand.claude/agents/*.md→ When grep tier values → Thensequant-qa-checker: sonnet,sequant-explorer: haiku,sequant-testgen: haiku,sequant-implementer(no model:), each with inline# Note: per anthropics/claude-code#43869 ...comment.Assumptions: Per Open Question Q1,
sonnetis the chosen tier forsequant-qa-checker.AC-2:
sequant doctorupstream-bug warningVerification: Unit Test (snapshot test in
src/commands/doctor.test.tsfor warning string + URL) + Integration Test (npx sequant doctor 2>&1 | grep -q '43869')Scenario: Given any environment → When user runs
sequant doctor→ Then stderr/stdout contains the one-line warning citing #43869 with the GitHub URL. When--quietset, warning is suppressed.Assumptions:
--quietflag needs to be added to thedoctorCommander option chain (does not exist today — verified via grep of doctor.ts).// TODO: remove when anthropics/claude-code#43869 closessentinel is colocated with the warning string.AC-3: Documentation audit (consolidated)
Verification: Manual Test (audit-gate grep
grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.tsreturns 0 stale claims; every match is either an updated tier or an "inert per #43869" annotation)Scenario: Given the 89 baseline
haikureferences → When AC-3 work complete → Then every reference is internally consistent with AC-1's tier choices and the upstream-bug reality.Assumptions: Sibling-site scan below extends the file list beyond what the issue body enumerated.
AC-4: Dead-config cleanup — keep with deprecation notice
Verification: Unit Test (Zod parse succeeds with
{ agents: { model: "haiku" } }) + Integration Test (doctor adds inert-field note whenagents.modelis non-default)Scenario: Given existing user
settings.jsonwith"model": "haiku"→ Whensequant doctorruns → Then settings parses without error AND warning includes second-line noteNote: agents.model is currently inert (see #43869).only whenagents.modeldiffers from the default.Assumptions: "Non-default" means the value differs from the as-shipped
DEFAULT_AGENT_SETTINGS.model. Behavior gates on the user's current settings, not the schema default.AC-5: CHANGELOG entry
Verification: Manual Test (grep
\[Unreleased\]section for#632reference)Scenario: Given
CHANGELOG.md→ When edited → Then[Unreleased]contains a one-line entry under### Changedor### Fixedciting #632 and #43869.Assumptions: Under
### Changed(model tier realignment + doctor warning are alignments, not bug fixes).Sibling-Site Scan Findings
The AC-3 audit-gate grep (
grep -rn '\bhaiku\b' ...) returns 89 matches today. The issue body explicitly enumerates ~10 file groups. Two additional sibling sites match the same root cause but are not listed in AC-3 — they will trip the audit gate and must be addressed in this PR:{.claude,templates,skills}/skills/setup/SKILL.md:188— examplesettings.jsonsnippet shown to users during/setupcontains"model": "haiku". Treatment: annotate the line with// inert per anthropics/claude-code#43869or drop the model field from the example, since AC-4 keeps the schema field with@deprecated.{.claude,templates,skills}/skills/spec/references/parallel-groups.md(8 occurrences each) — table + examples document[model: haiku]annotations as the default for parallel-group tasks. AC-3 already keeps the parser intact inexec/SKILL.mdwith an "inert" comment. Apply the same treatment here: add a one-line note at the top of the section pointing toexec/SKILL.md's inert-note OR inline an "inert per #43869" comment by the table.Both sites are in all three skill mirrors (
.claude/skills/,templates/skills/,skills/) — verify withnpx tsx scripts/check-skill-sync.tsafter edits.Implementation Plan
Phase 1: Agent declarations (AC-1)
templates/agents/sequant-qa-checker.md— changemodel: haiku→model: sonnet; insert# Note: per anthropics/claude-code#43869 this is currently a no-op; agent runs on parent's modeldirectly abovemodel:.templates/agents/sequant-explorer.mdandtemplates/agents/sequant-testgen.md— keepmodel: haiku, add the same inline note..claude/agents/(use Read on each file first; do not assume identical content — apply changes per-file).sequant-implementer.mdis unchanged (nomodel:field).Phase 2: Doctor warning + deprecation (AC-2, AC-4)
src/lib/settings.ts:@deprecated currently inert; see anthropics/claude-code#43869..default("haiku")at L277),DEFAULT_AGENT_SETTINGS.modelat L571, generated settings.json comment at L826, and markdown table at L948 as-is in value but update each prose claim to note "inert per #43869."--quietflag (AC-2) — Verified by grep that no--quiet/isQuietexists in doctor.ts today. Add.option("-q, --quiet", "suppress informational warnings")to thedoctorcommand registration inbin/cli.ts; thread it intoDoctorOptions.emitUpstreamWarning(options: { isQuiet?: boolean; agentsModel?: string; defaultAgentsModel: string })near the top ofdoctor.ts. Returns the formatted lines and the// TODO: remove when anthropics/claude-code#43869 closessentinel. Always emits the primary line; conditionally appends the AC-4 second line whenagentsModel !== defaultAgentsModel. HonorsisQuiet. Call fromrunDoctor()near the end (after the existing checks header).src/commands/doctor.test.ts— covers: (a) warning line includes43869, (b) link ishttps://github.com/anthropics/claude-code/issues/43869, (c)--quietsuppresses, (d) AC-4 second-line note appears only whenagents.modelis non-default.Phase 3: Documentation audit (AC-3) — fan out file-by-file
Mirror discipline: Per
feedback_read_each_mirrored_file.md, Read each file independently before Edit. Don'treplace_allacross mirrors blindly. After each file group, runnpx tsx scripts/check-skill-sync.ts.docs/features/declarative-agents.md— update agent table (L62-65), example frontmatter (L107), add "Known Upstream Limitations" subsection referencing #43869 + #57718; state model fields are aspirational.docs/features/plugin-distribution.md:94— strike or annotate theagents.modelrow.docs/concepts/workflow-phases.md:56— update "haiku sub-agents for cost-efficient stub generation" prose._shared/references/subagent-types.md× 3 mirrors — agent table (L22-25), "Default: Use haiku" rule (L140), recommendation tables (L204-207), example frontmatter (L71), the "model comes from .claude/agents/sequant-qa-checker.md (haiku)" line (L145).testgen/SKILL.md× 3 mirrors — strike fictional token-cost claim at L148-149; rewrite L44/L58/L90/L125-127/L134 prose to remove "use haiku" runtime claims (replace with "designated as haiku — currently inherits parent per #43869").exec/SKILL.md× 3 mirrors —[model: haiku]parser logic at L1539-1544 and inlinemodel="haiku"examples at L1555/L1686/L1693 stay in place; add one comment line at the parser block header:# Note: model param inert per anthropics/claude-code#43869; reactivates when fixed.setup/SKILL.md:188× 3 mirrors — annotate the example"model": "haiku"line.spec/references/parallel-groups.md× 3 mirrors — add a "inert per #43869" note near the table on L28-34; do not strip examples.Phase 4: CHANGELOG + audit verification (AC-5)
### Changedentry under[Unreleased]inCHANGELOG.md: one-line summary citing fix(agents): realign declared model tiers; document upstream routing bug #632 and Subagent model routing is broken — all mechanisms resolve to parent model (Opus) anthropics/claude-code#43869.grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.ts— verify every match is either a current tier claim consistent with AC-1 or an explicit "inert per #43869" annotation. Iterate until clean.npx tsx scripts/check-skill-sync.ts— expect "synced 3/3" for every affected SKILL.md / reference file.Design Review
Where does this logic belong?
src/commands/doctor.tsnext to the existing settings-driven checks. Schema deprecation lives insrc/lib/settings.tsnext to the existingAgentSettingsinterface.What's the simplest correct approach?
[model: ...]parser (forces a re-release when upstream lands).What existing pattern does this follow?
Checkinterface andui.warn()rendering pattern.@deprecatedannotation is novel for this codebase but is a standard TS/JSDoc convention.What would a senior reviewer challenge?
agents.modelschema field if it's inert?" — Answer: removing it makes existing usersettings.jsonfiles fail Zod parse. AC-4 explicitly captures this.doctorrather than at agent-spawn time?" — Answer: agent spawning is opaque to user code; doctor is the canonical health-check surface and runs unconditionally.Feature Quality Planning
All standard checks pass. Notable items:
scripts/check-skill-sync.tsis the gate. Perfeedback_replace_all_indent.mdandfeedback_replace_all_enum_strings.md: do not bulk-replacehaikuacross all files at once — many occurrences are inside example settings, type signatures, or tier-distribution prose that should not change.agents.model(haiku vs. non-default) to prevent regression.Open Questions
sequant-qa-checkertier:sonnetoropus?Recommendation:
sonnet. Cheaper, matchesqa-expertin the VoltAgent baseline (closest functional analog — sequant's checker runs deterministic diff-grep gates, not architecture review). Impact if wrong: easy to flip later; tier value is aspirational until #43869 lands.Sibling sites (
setup/SKILL.md,spec/references/parallel-groups.md) — fold into AC-3 or file as follow-up?Recommendation: fold in. Audit-gate grep will trip on them; deferring would leave the gate failing. Cost is small (~15 mechanical edits across 6 mirrored files).
Add
enhancementortech-debtlabel?The current labels (
documentation,upstream,multi-agent) understate the runtime code changes (doctor warning, schema deprecation, CLI flag). Recommendation: addtech-debtfor accurate accounting. Non-blocking.Recommended Workflow
Phases: spec → exec → qa
Quality Loop: enabled
Reasoning: Matches /assess recommendation (
<!-- assess:phases=spec,exec,qa -->,<!-- assess:quality-loop=true -->). Testgen skipped because the only Unit Test ACs (AC-2 snapshot, AC-4 schema parse) are small, focused, and easier to write inline with the implementation than to stub ahead-of-time. Docs phase skipped — this is the docs audit. Browser tests N/A (CLI + markdown).Label Review
Current:
documentation,upstream,multi-agentRecommended: add
tech-debt(runtime code indoctor.tsandsettings.ts)Reason: AC-2 and AC-4 add real runtime behavior (CLI flag, warning emission, schema annotation) — not pure docs.
Quality Loop: auto-enabled per assess (warranted given the audit-gate breadth)
→
gh issue edit 632 --add-label tech-debtadmarble commentedon May 13, 2026
/exec Progress Update — PR #636
All 5 ACs implemented. PR #636 is open.
AC Coverage
sequant-qa-checkerhaiku→sonnet across both agent dirs; explorer/testgen kept haiku. Each agent file has the inline# Note: per anthropics/claude-code#43869comment.--quietemitUpstreamWarning()+ exportedUPSTREAM_SUBAGENT_WARNING;-q, --quietregistered inbin/cli.ts. 4 new tests insrc/commands/doctor.test.tsall pass.// TODO: remove when anthropics/claude-code#43869 closessentinel colocated.\bhaiku\bmatch is either an updated tier or an explicit "inert per #43869" annotation.AgentSettings.modelJSDoc carries@deprecated; Zod schema +DEFAULT_AGENT_SETTINGS.modelkept so existing user settings.json files still parse. Doctor's second-lineNote: agents.model is currently inert (see #43869).only fires when the value differs from default — covered by a dedicated unit test.[Unreleased] / ### Changedentry citing #632 + upstream #43869.Files Changed
29 files. Highlights:
{.claude,templates}/agents/sequant-{qa-checker,explorer,testgen}.mdsrc/commands/doctor.ts,src/commands/doctor.test.ts,src/lib/settings.ts,bin/cli.tsdocs/features/declarative-agents.md,docs/features/plugin-distribution.md,docs/concepts/workflow-phases.md_shared/references/subagent-types.md,testgen/SKILL.md,exec/SKILL.md,setup/SKILL.md,spec/references/parallel-groups.mdQuality Plan Alignment
npx tsx scripts/check-skill-sync.tsreports all 5 modified filessynced 3/3. Per-file edits thencp-based propagation (perfeedback_read_each_mirrored_file.md).haiku, one asserting note present onopus."model": "haiku"files continue to parse.Derived ACs: None — none extracted from the spec comment.
Build/Lint/Test Results
npm run build— ✅ TypeScript compilesnpm run lint— ✅ 0 errors, 0 warningsnpx vitest run src/commands/doctor.test.ts— ✅ 34/34npx vitest run src/commands/ src/lib/scope/— ✅ 338/338 passnpx tsx bin/cli.ts doctor --skip-issue-check 2>&1 | grep -E '43869'matches;--quietsuppresses (grep count 0)Pre-PR Confidence Check
console.logspies — if the warning ever moves toconsole.errororprocess.stderr.write, the assertions will quietly stop matching. The exportedUPSTREAM_SUBAGENT_WARNINGconstant mitigates this by giving callers a single source of truth.bin/cli.ts-q, --quietflag registration has no dedicated test (covered indirectly bydoctorCommand({ quiet: true })unit test); thesrc/lib/settings.tschanges are JSDoc + prose annotations only (no runtime behavior change to test).PR Status
Next Steps
Ready for
/qa. The audit-gate grep is the central coherence test; QA should run it and confirm every match is annotated.admarble commentedon May 13, 2026
QA Review for Issue #632
PR: #636 · Commit:
ed33459AC Coverage
# Note:per #43869 in both.claude/agents/andtemplates/agents/)grep "^model:" templates/agents/*.md .claude/agents/*.mdshows the correct tiers in all 6 files. Each file has the verbatim inline note abovemodel:.sequant-implementerunchanged (nomodel:).sequant doctorwarning citing #43869 + link, suppressible via--quiet, snapshot test indoctor.test.tsnpx sequant doctoremitsWARN: Claude Code #43869 — subagent model: declarations are ignored. …followed byhttps://github.com/anthropics/claude-code/issues/43869.doctor({quiet:true})smoke-tested locally — warning suppressed.// TODO: remove when anthropics/claude-code#43869 closessentinel present atsrc/commands/doctor.ts:46. Snapshot tests atdoctor.test.ts:666-747cover primary line, link,--quietsuppression, and inert-field-note presence/absence. AC text mentions "or doctor settings"; only the--quietflag was implemented, matching the spec plan's resolution (treated as MET).\bhaiku\breference is either an updated tier or an explicit "inert per #43869" annotationgrep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.ts— every match falls into one of: updated tier, an "inert per #43869" inline/block annotation, or a deprecation note. Sibling-site fixes from spec analysis (parallel-groups.md, setup/SKILL.md"model": "haiku"example) addressed. Skill mirrors for the 5 files this PR touched all in sync (npx tsx scripts/check-skill-sync.tsreportssyncedforsubagent-types.md,exec/SKILL.md,setup/SKILL.md,spec/references/parallel-groups.md,testgen/SKILL.md).docs/features/declarative-agents.mdgains a "Known Upstream Limitations" subsection referencing both #43869 and #57718.AgentSettings.modelkept in schema, marked@deprecated, doctor emits second-line note when non-defaultsrc/lib/settings.ts:52-57carries@deprecated currently inert; see anthropics/claude-code#43869JSDoc. Verified existing{ agents: { model: "haiku" } }still parses via Zod (smoke test).emitUpstreamWarningonly appendsNote: agents.model is currently inert (see #43869).whenagentsModel !== defaultAgentsModel— covered bydoctor.test.ts:684-746.[Unreleased]entry citing #632 and #43869CHANGELOG.md## [Unreleased] ### Changedhas one-line entry leading with "Subagent model tiers realigned +sequant doctorupstream-bug warning" and ending(#632, refs anthropics/claude-code#43869).Coverage: 5/5 ACs functionally met.
Precheck Findings
UPSTREAM_SUBAGENT_WARNING,emitUpstreamWarning); 0 sibling sitesSource:
.sequant/gap-precheck.json(schemaVersion 1)CI Status
build (22.x)build (20.x)typecheckHooks ValidationPlugin Structure ValidationSetup Directory Creationvalidate-pluginvalidate-skillsCI Summary: 6 passed, 1 failed, 1 cancelled (matrix fail-fast)
Diff is not markdown-only (touches
src/commands/doctor.ts,src/commands/doctor.test.ts,src/lib/settings.ts,bin/cli.ts), so the build matrix is gating. Markdown-only relaxation does not apply.Build Verification
npm run build(tsc only)npm test(full suite)origin/mainSKILL.md text)Failing tests (both in
src/lib/__tests__/testgen-skill.test.ts):L25-29 —
should have Token Optimization with Haiku Sub-Agents sectionexpect(skillContent).toContain("## Token Optimization with Haiku Sub-Agents")— but AC-3's rewrite renamed this heading to## Sub-Agent Delegation for Stub Generation(now at.claude/skills/testgen/SKILL.md:42).L56-59 —
should document cost savings from haiku usageexpect(skillContent).toMatch(/90%.*token.*cost.*reduction/i)— AC-3 explicitly required striking the fictionalWithout haiku: ~50K tokens. With haiku: ~5K tokens.claim. The 90% reduction claim it was paired with is gone, which is the intended AC-3 outcome.These tests were not in the PR's diff (
git diff origin/main...HEAD -- src/lib/__tests__/testgen-skill.test.tsis empty) but the PR's content changes broke them. They need to be updated or deleted as part of this PR — otherwise the AC-3 audit-gate result is internally inconsistent (skill says X, test asserts Y).Note: Test file's top-of-file doc comment also references the haiku claim ("AC-2: Documentation or test confirms /testgen uses haiku sub-agents at runtime") — that comment block is now misleading independent of the assertion fix.
Quality Metrics
any) addednpm run lintnpm run lint:skill-calls.claude/skills/,templates/skills/,skills/Test Coverage Analysis
src/commands/doctor.tssrc/commands/doctor.test.ts(4 new tests added)src/lib/settings.ts__tests__/settings-schema.test.ts(30 pass, includes default model = "haiku")bin/cli.tsdoctor.test.ts{ quiet: true }path.claude/agents/*.md,templates/agents/*.mdgrep "^model:"in issue verificationdocs/**, skill markdownsrc/lib/__tests__/testgen-skill.test.tsCoverage: New runtime code (
emitUpstreamWarning, AC-2/AC-4) is well-tested by 4 added unit tests covering: default warning emission, link presence,--quietsuppression, conditional inert-field note (default vs non-defaultagents.model).Code Review
Strengths:
UPSTREAM_SUBAGENT_WARNINGexported as a frozenconstso tests assert against the same string the runtime emits — avoids snapshot drift.// TODO: remove when anthropics/claude-code#43869 closessentinel co-located with the warning constant atdoctor.ts:46, exactly as AC-2's implementation note requires. Easy to grep for during follow-up cleanup.emitUpstreamWarningis pure (no I/O beyondconsole.log), takes its inputs explicitly, and the AC-4 second-line behavior is gated by a single equality check againstDEFAULT_AGENT_SETTINGS.model— easy to reason about and test.@deprecatedrather than delete) avoids silently breaking every existing user.sequant/settings.json— exactly the right call.docs/features/declarative-agents.mdagent table now saysModel (declared)column header and adds a labeled> Known upstream limitation:blockquote above the table, so users read the caveat before the values.### Changedincludes the audit-gate command verbatim so a reader can re-run the verification locally.Issues:
src/lib/__tests__/testgen-skill.test.ts:25-29and:56-59assert on content AC-3 explicitly removed/renamed. The PR completed AC-3's prose sweep but missed the test that pins the OLD content in place. Perfeedback_full_suite_on_api_breaks.mdand the regression evidence above, this needs to be in this PR.Suggestions:
testgen-skill.test.ts:36-50(Parse.*Verification.*Criteria.*haiku,Generate.*Test.*Stub.*haiku, etc.) currently do pass against the updated SKILL.md because the rewrite kept "haiku" tokens with "inert per #43869" qualifications. But they encode the assumption that haiku is the runtime tier — when #43869 closes and the docs get another sweep, these will be the next batch to break. Consider replacing them with assertions on the inert-note presence ("inert per anthropics/claude-code#43869") which is the actual invariant this PR establishes.Test Quality Review
--quiet, default-model path, non-default-model path all coveredgetSettingsmock extended withmockResolvedValueOncefor per-test overrides — appropriate scopeAnti-Pattern Detection
Dependency Audit
N/A —
package.jsonnot modified.Code Patterns
No anti-patterns introduced. The runtime changes are limited to one new pure function, one exported
const, and a single--quietCLI option registration inbin/cli.ts:165. No N+1, no empty catches, no hardcoded secrets, no SQL.Critical Issues: 0
Warnings: 0
CLI Registration Verification
DoctorOptions.quietoptions.quietindoctorCommand(doctor.ts:604).option("-q, --quiet", ...)atbin/cli.ts:165Verification Status: Passed.
Skill Command Verification
5 skill markdown files modified. Skill calls and embedded commands are documentation prose (parser specs, snippets), not executable commands the skill walks. No
gh ... --json Xfield-validation surface.npm run lint:skill-callsreports 0 violations across 105 skill files.Verification Status: N/A — no executable commands changed.
Detection Pattern Verification
The 5 changed skill markdown files don't introduce new
grep/awk/jq/sedpatterns or regex literals — they update prose, tables, and HTML/block notes. Confirmed by inspecting added lines.Verification Status: Not Required.
Skill Change Review
grep -rn '\bhaiku\b' …executed against the feature branch — every match is either an updated tier or an explicit "inert per #43869" annotation.Execution Evidence
npx tsx -e 'import("./src/commands/doctor.ts").then(m => m.doctorCommand({ skipIssueCheck: true }))'WARN: Claude Code #43869 …+ URL--quiet)... doctorCommand({ skipIssueCheck: true, quiet: true })43869/ noWARNin outputnpx tsx -e ... SettingsSchema.safeParse({ agents: { model: "haiku" } })parse ok: true; model = haikugrep "^model:" templates/agents/*.md .claude/agents/*.mdgrep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.tsnpx tsx scripts/check-skill-sync.ts(5 files this PR touched)npm run buildnpm run lintnpm run lint:skill-callsnpm testEvidence status: Complete — but reveals the test regression.
Manual Test ACs
None of the AC verification methods are runtime/UI-manual. All issue-body verification steps are CLI/grep behaviors executed above.
Risk Assessment
mainuntil tests fixed. Lower-risk fallout: future contributors updatetestgen/SKILL.mdfurther and re-introduce drift because the stale tests no longer guard the new invariants (they're either deleted-on-fix or rewritten to assert the inert-note invariant).agents.modeldiffers from default" path is tested withmodel: "opus", but not with the other non-default value (model: "sonnet"). The implementation uses strict!==, so both branches would behave the same — low-impact gap.UPSTREAM_SUBAGENT_WARNING/emitUpstreamWarning. Manual scan: no othersrc/commands/*.tsemits subagent-model guidance; the warning belongs only indoctor.doctor.tshas no other "model"-related output paths; theemitUpstreamWarningcall site (line 603) is the only place inrunDoctorwhere this surfaces.Adversarial Re-Read
Findings:
src/lib/__tests__/testgen-skill.test.ts— Walking the diff adversarially against existing tests revealed two assertions pinning the OLD haiku claims. The AC-3 prose change is correct; the missing piece is the test update. Already enumerated under Build Verification & Code Review.--quietflag or doctor settings. Only--quietis wired. Spec plan resolved this as either-or; treating as MET, but flagging so reviewers can confirm intent..claude/settings.local.json:342— a gitignored local file with apython3 ... haiku ...shell command in a permission allowlist. Not a stale claim about runtime behavior; safe to ignore for the audit's purpose.## Verificationsection executed and produced the AC-claimed results.origin/feature/632-…, branch 0 ahead / 0 behind origin, no uncommitted changes.isolation: worktreeSDK migration) were touched.Status: Severe Gap — finding (1) is a missing-test-update that causes CI to fail and that AC-3's audit-gate cannot self-detect.
Verdict: AC_NOT_MET
The 5 ACs are functionally met by the implementation, but the PR's AC-3 prose rewrite of
testgen/SKILL.mdbroke 2 pre-existing assertions insrc/lib/__tests__/testgen-skill.test.ts— assertions that pin the OLD haiku claims this PR was explicitly chartered to remove. CI'sbuild (22.x)job is red as a direct consequence (3188/3190 pass).This is exactly the "API break without full-suite check" pattern called out in
feedback_full_suite_on_api_breaks.md— except here it's a content/test contract rather than an API signature. Fix is mechanical and belongs in this PR (not a follow-up issue), so AC-3 stays internally consistent at merge time.Documentation
[Unreleased] ### Changed— present and citing fix(agents): realign declared model tiers; document upstream routing bug #632 + #43869docs/features/declarative-agents.md— agent table updated + new "Known Upstream Limitations" subsectiondocs/features/plugin-distribution.md—agents.modelrow annotated as inertdocs/concepts/workflow-phases.md— testgen prose annotatedNext Steps
src/lib/__tests__/testgen-skill.test.ts:"## Token Optimization with Haiku Sub-Agents"→"## Sub-Agent Delegation for Stub Generation"(or delete the test entirely — the heading itself isn't load-bearing).90%.*token.*cost.*reductionassertion. AC-3 explicitly required removing this claim; the test must follow.Parse.*Verification.*Criteria.*haiku/Generate.*Test.*Stub.*haikuassertions with assertions on the"inert per anthropics/claude-code#43869"annotation text — that's the actual contract this PR establishes./qa 632— verdict should flip toREADY_FOR_MERGE.anthropics/claude-code#43869, the// TODOsentinel atdoctor.ts:46and the matching deprecation notes will be the cleanup follow-up issue.test(#632): update testgen-skill assertions to match AC-3 prose rewrite
admarble commentedon May 13, 2026
QA Review for Issue #632 (Iteration 2)
PR: #636 · Commit:
ebe6ca6· Prior QA:ed33459(AC_NOT_MET)Incremental QA Summary
Changes since last QA: 1 file (
src/lib/__tests__/testgen-skill.test.ts)AC Coverage
grep "^model:"confirms qa-checker→sonnet, explorer/testgen→haiku across both agent dirs; inline note present in all 6 files.sequant doctorwarning +--quiet+ snapshot testdoctor.test.tspass;// TODO: remove when anthropics/claude-code#43869 closessentinel atdoctor.ts:46.\bhaiku\breference updated or annotatedAgentSettings.model@deprecated+ inert-field note[Unreleased]entry citing #632 + #43869Coverage: 5/5 ACs fully met.
CI Status
build (20.x)build (22.x)typecheckvalidate-skillsvalidate-pluginPlugin Structure ValidationHooks ValidationSetup Directory CreationCI Summary: 8 passed, 0 pending, 0 failed.
mergeable: MERGEABLE.Build Verification
npm run buildnpm testnpm run lintQuality Metrics
any) addedCode Review (Delta from Prior QA)
The only change in this iteration is
src/lib/__tests__/testgen-skill.test.ts(+15 / -7). Adversarial review of the delta:Strengths:
Required before mergeitems from the prior QA (L25-29 heading rename, L56-59 cost-savings assertion replacement) without touching unrelated tests.anthropics/claude-code#43869reference +inert/currently inertwording) rather than re-encoding fragile cost-savings prose."## Sub-Agent Delegation for Stub Generation") — verified by Read against.claude/skills/testgen/SKILL.md:30.Issues: None.
Suggestions (non-blocking, deferred):
Parse.*Verification.*Criteria.*haiku/Generate.*Test.*Stub.*haikuassertions still encode the haiku-as-runtime assumption. Currently passing because the rewrite kept haiku tokens with "inert per #43869" qualifications. The prior QA flagged this as Optionally (not Required). These tests will only need updating after #43869 closes AND a future docs sweep removes "haiku" entirely — at which point that future PR will own the rewrite. Defer.Test Coverage Analysis
src/lib/__tests__/testgen-skill.test.tsTest Quality Review
Anti-Pattern Detection
Dependency Audit
N/A — no
package.jsonchanges.Code Patterns
None — diff is test-file content only.
Critical Issues: 0
Warnings: 0
Self-Evaluation
testgen/SKILL.md:30literally.anthropics/claude-code#43869+inert) that AC-3 introduced as the contract. If a future change removes the inert annotation, this test will fail.Adversarial Re-Read of New Commit
"## Sub-Agent Delegation for Stub Generation"matches.claude/skills/testgen/SKILL.md:30exactly./inert|currently inert/imatches the wording established in the SKILL.md prose at lines 32-50 and the agent-file inline notes.build (22.x): FAILURE+build (20.x): CANCELLED. Both now SUCCESS; matrix is no longer fail-fast-cancelling.Verdict: READY_FOR_MERGE
The single AC_NOT_MET blocker from iteration 1 (a stale test pinning AC-3's pre-rewrite prose) is closed. All 5 ACs are MET, all 8 CI checks SUCCESS, full local test suite 3190/3190, lint clean, build clean, branch in sync.
Documentation
[Unreleased] / ### Changedentry present (citing fix(agents): realign declared model tiers; document upstream routing bug #632 + #43869)docs/features/declarative-agents.md— Known Upstream Limitations subsection addeddocs/features/plugin-distribution.md—agents.modelrow annotated as inertdocs/concepts/workflow-phases.md— testgen prose annotated-q, --quietextension ondoctor, already covered via--help)Next Steps
// TODOsentinel atdoctor.ts:46to remove the warning + reactivate the declared tiers. File a follow-up issue at that time.admarble commentedon May 13, 2026
/fullsolve Complete — Issue #632
Status: READY_FOR_MERGE
PR: #636 (commit
ebe6ca6, all 8 CI checks SUCCESS, mergeable)Progress
AC Coverage (final)
sequant doctorupstream-bug warning +--quiet→ MET\bhaiku\bannotated/updated) → METAgentSettings.model@deprecated+ non-default inert note → MET[Unreleased]entry → MET5/5 AC met.
Quality Loop (iteration 2)
Iteration 1 verdict was
AC_NOT_METbecause AC-3's prose rewrite oftestgen/SKILL.mdbroke 2 pre-existing assertions insrc/lib/__tests__/testgen-skill.test.ts— a contract-internal-consistency gap the audit-gate grep could not self-detect. CI'sbuild (22.x)was red as a direct result.This iteration's commit (
ebe6ca6, "test(#632): update testgen-skill assertions to match AC-3 prose rewrite") closes that gap:"## Token Optimization with Haiku Sub-Agents"→"## Sub-Agent Delegation for Stub Generation"anthropics/claude-code#43869reference +inertwording)Quality Metrics
any) addedRisk Assessment
--quiet. The deprecation annotation onagents.modelis a JSDoc-only marker; existing usersettings.jsonfiles continue to parse.testgen-skill.test.ts:41-49(Parse.*Verification.*Criteria.*haiku/Generate.*Test.*Stub.*haiku) currently pass against the new SKILL.md because the rewrite kept haiku tokens with inert annotations. They will only break after upstream #43869 closes AND a future docs sweep removes "haiku" entirely — at which point that future PR's QA will own the rewrite. Deferred (explicitly marked Optionally in iteration 1's QA).maxTurns/effortcaps, runtime override wiring,[model: ...]parser strip,isolation: worktreeSDK migration) were touched.Final Verdict: READY_FOR_MERGE
Recommended next action:
gh pr merge 636 --squashthen./scripts/cleanup-worktree.sh feature/632-fix-agents-realign-declared-model-tiers-document-uper the standard merge order.fix(#632): realign agent model tiers + document upstream routing bug (#…