Repository navigation
feat(#914): per-phase model and effort configuration for the claude-code driver - #923
Merged
admarble merged 3 commits intoAug 9, 2026
Conversation
Seeds the 9 ACs from the /spec plan: settings parsing, the shared parsePhaseSpec/resolvePhasePolicies resolver, both ExecutionConfig producers (config-resolver + ready-gate), ClaudeCodeDriver forwarding, Aider inertness, metrics recording, and the RunOptions live-surface guard. All stubs verified RED for the right reason (missing export / unimplemented behavior), not a syntax error.
…ode driver
Adds `run.phases.<phase>.{model,effort}` settings and `sequant run`/`sequant
ready` flags `--models`/`--efforts` so a phase can use a different Claude
model or reasoning effort than the CLI default (e.g. planning with a
stronger model, delegating implementation to a cheaper one). Absent by
default: query() options omit both fields entirely until opted in.
Wiring: config-resolver.ts's parsePhaseSpec/resolvePhasePolicies is the
single resolver both buildExecutionConfig (run) and ready-gate.ts's
buildPhaseConfig (ready) call for CLI > settings > absent precedence, so the
two producers cannot drift the way the #833 phaseTimeout producers did.
phase-executor.ts applies config.phasePolicies[phase] onto
AgentExecutionConfig; claude-code.ts forwards model/effort into query()
options; Aider is unaffected (uses its own AiderSettings.model). Metrics
record the resolved policy per phase when set, omitted when inherited.
Mutation-verified: the AC-3 absence test (query() options contain neither
model nor effort when unset) asserts key-presence via `in`, not truthiness,
and passes today unmodified — confirming it's a live regression gate.
9 tasks
Addresses the 4 gaps noted in QA on #914: 1. phase-executor.ts's connective wiring (config.phasePolicies[phase] -> AgentExecutionConfig.model/.effort) had no direct test. Added one by driving the real (unexported) executePhase through the public executePhaseWithRetry entry point with a mocked driver. 2. run-orchestrator.ts's and metrics-writer.ts's phasePolicies pass-throughs were untested. Added a direct test for RunOrchestrator.recordMetrics (called via cast, same trade-off as executeOneIssue's existing test) and a real-filesystem persist/reread test in metrics-writer.test.ts. 3. --efforts didn't validate against the closed enum at the CLI boundary, only at settings-parse time. parsePhaseSpecFlag now accepts an optional allowedValues list; --efforts passes settings.ts's new exported EFFORT_LEVELS constant (single source of truth for both validation points), --models remains unvalidated by design. 4. AC-9 docs lived only in docs/reference/*.md, not the top-level README. Added the run.phases settings shape and a link to the Per-Phase Model & Effort section directly in README.md's Configuration example. 11 new/updated tests, full suite green (255 files, 5266 passed, 0 failed).
admarble
deleted the
feature/914-feat-run-per-phase-model-and-effort-configuration-
branch
August 9, 2026 00:38
7 tasks
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to 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.
Summary
run.phases.<phase>.{model,effort}settings andsequant run/sequant readyflags--models/--effortsso a phase can use a different Claude model or reasoning effort than the CLI default (e.g. planning with a stronger model, delegating implementation to a cheaper one).query()options omit both fields entirely until opted in — zero behavior change.resolvePhasePoliciesresolver (config-resolver.ts) is called by bothbuildExecutionConfig(therunpath) andready-gate.ts'sbuildPhaseConfig(thereadypath), so the two producers cannot drift the way the fix(cli): bare parseInt on run --timeout lets a malformed value abort every phase instantly (sibling of #818) #833phaseTimeoutproducers once did.AC Coverage
All 9 ACs MET — see the full QA review on the issue for the detailed table, execution evidence, and adversarial re-read.
Test plan
npm run build— cleannpm run lint— clean--helpshows both flags onrunandready; malformed specs rejected with exit 1 and a clear message; valid specs parse cleanlyCloses #914
🤖 Generated with Claude Code