Repository navigation
Conversation
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
2 similar comments
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Check whether the shared-runtime start path ( [DESIGN-REVIEWED] 111f2f2 Description read[DESCRIPTION-READ] be894e33cee06b28f0a3dc1fa95aed2ebfc0bac3786910b0398766813d142168 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Check that no backend on the shared-runtime start path also rewrites the pin spelling. The re-key runs only on the What this change shipsInventory (4 items) — 4 justifiedIntent: a Claude crew that pins both a model and a reasoning effort actually runs at that effort. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 111f2f2 Description read[DESCRIPTION-READ] 553fde23d4f56ead9ded74d8828a4b785d7d96104310145d9eaa4177f8123251 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
d13132d to
10a608d
Compare
The factory keys effort_per_model by the configured model id, but claude startup rewrites the session model to the advertised spelling (claude-opus-5.5 -> claude-opus-5-5[1m]). The initial effort lookup then misses and the configured level is never pushed, so Claude Code runs its own default effort. Re-key the level to the model the session runs after startup; a refused pin leaves it unapplied.
10a608d to
111f2f2
Compare
|
Thank you for this fix, @ash663! 🙏 This PR conflicted with current |
Problem / Motivation
Goal: A Claude crew that pins both a model and a reasoning effort runs at that effort.
A crew configured with a model pin (
claude-opus-5.5) andreasoning_effort: maxon the Claude backend runs at Claude Code's own default effort (mediumin the session transcript). Nothing is logged: no "will not be applied" warning from the factory, and no "initial effort apply failed" warning from the provider.Why it matters
Every Claude crew that pins a model whose configured spelling differs from the spelling claude-agent-acp advertises silently loses its configured effort on every session start. The dashboard shows the configured level while the session runs another.
Not a goal
_set_effort_config_option.What changed (motivation → approach → change)
effort_per_modelby the configured model id. During startupAcpClient._apply_startup_modelrewrites the session model to the advertised spelling (claude-opus-5-5[1m]) before pushing it._apply_initial_effortthen resolves effort for the advertised spelling, misses the entry keyed under the configured one, and returns without pushing anything.AcpProviderkeeps the model it was constructed with. On the client start path, afterensure_ready(),startmoves that entry to the model the client records, so_apply_initial_effortfinds it and pushes('effort', <level>). An entry already present under the recorded spelling wins.auto). The entry stays under the configured spelling and no effort is pushed. The level was chosen for the pinned model, andautois not effort-capable in the registry, so the session keeps the adapter's own default. That is the same outcome as before this change.docs/system-specs/modules/providers.mdstates the re-keying next to the factory's threading of the level.Backwards compatibility
Compatible: when the configured and recorded spellings are equal, the entry is popped and put back under the same key. Every other path is untouched.
Removes nothing: the change only moves an in-memory map entry to the key the existing lookup reads.
Tests
test/test_acp_provider.py::TestEffortControl::test_claude_start_pushes_effort_keyed_by_configured_model_spelling: a Claude provider built witheffort_per_model={'claude-opus-5.5': 'max'}, whose client'sensure_ready()rewrites the model toclaude-opus-5-5[1m], must push('effort', 'max')fromstart(). On the unfixed tree it fails withExpected set_config_option to have been awaited once. Awaited 0 times.With the fix it passes.Also run:
test/test_acp_provider.py,test/test_acp_codex_harness.py,test/test_codex_effort_pair_model_switch.pyandtest/test_session_work_dir.py(316 passed); black, isort and flake8 on the touched files;mypy src/kiro_crew/; the black, subprocess-encoding, harness-parity and docs-lint gates.Manual verification
N/A — the unit test drives the real
start()→_apply_initial_effort()→_set_effort_config_option()path with the client's model rewrite reproduced. The observed failure was the missingset_config_option('effort', …)call, and that call is what the test asserts.Related Issues
Found while testing per-crew ACP backend pins (#16200) with a Claude crew pinned to a model and an effort.
Pattern harvest
Not generalizable: this is the one map keyed by the model id before startup and read by it after. Every other effort site reads and writes under the recorded spelling.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)