Repository navigation
fix(subagents): show that a model or effort pin costs each subagent its own runtime - #23510
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: the change only reports, it never changes how a run starts, and the note is derived from the run's own sharing plan. Notes
[DESIGN-REVIEWED] 93d1f97 Description read[DESCRIPTION-READ] 102941c1e977d78a656c190c13b9fdfb88ffb4f95de07e5558ff0d51daa702c8 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 |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The only change you can see is one static line of text, both screenshots show it, and the blind reader understood the main point: it is "a warning that changing either setting below uses more of my computer's memory and could slow it down." Notes
[UX-REVIEWED] 93d1f97 Description read[DESCRIPTION-READ] b9c089b305b62b2140cb0360bf6290618aa4e291d84669f7d3cd59724dbac586 That sha256 names everything this verdict read: the PR description, plus the 5 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) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The spawn handler copies part of the share rule into a second place. That is a note, not a block. Notes
What this change shipsInventory (5 items) — 4 justifiedIntent: let users and agents see that a subagent model or effort pin costs about 0.55 GB per subagent, before the host starts swapping (#23484). FIX (it fills a missing disclosure).
[FIRST-PRINCIPLES-REVIEWED] 93d1f97 Description read[DESCRIPTION-READ] 8f24e01301f163ce341908bf96e36db2803866dc16790acbab33d946d545ff52 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. Notes:
[OPUS-REVIEWED] 93d1f97 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findings (all downgraded on adjudication)GPT 6.1 flagged blocking issues on This comment is updated in place on each push. Review detailsBLOCKING -- src/kiro_crew/dashboard/messaging_api/spawn.py:525 -- Runtime note promises sharing despite an AWS profile split
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 is LOW. The only thing wrong is the wording of an informational receipt string. The run itself still picks the correct runtime and is priced correctly.
False positive or not applicable? A repository writer can comment: |
a019a81 to
ec68b7c
Compare
0e226d0 to
b3db0c7
Compare
|
|
|
|
b3db0c7 to
d62a3d0
Compare
|
d62a3d0 to
93d1f97
Compare
cruisercohen
left a comment
There was a problem hiding this comment.
Approving at 93d1f97.
The change is reporting only: help text, one Settings line, an optional runtime_note key on the POST /api/spawn reply, and one receipt line in spawn_run. Nothing changes how a run starts or whether it shares. The note reads the run's own _sharing_plan off the loop, asks the "would it share without the pin" question on a shallow copy (the run's own info is never mutated), and any exception in that path drops the note rather than failing the spawn.
Checked on this head merged with current main (b769bf7c99, clean merge):
- Backend: 24 files around spawn, session sharing, role pins, AWS project profiles, the messaging facade and config baseline, 1037 passed.
- Frontend: the 22
ChatPaneltest files plus the new cost-line test, 301 passed. - The new tests pin the change. With the note never returned, 3 cases fail; with the "pin is what took the share away" check removed, 4 fail; with the receipt line dropped, 1 fails.
One non-blocking note: the "would it share without the pin" check calls _should_use_session_sharing, which does not look at the aws.project_profiles split that _sharing_plan also applies. So a pinned run whose cwd binds a different AWS profile from its parent's gets a note saying it would otherwise share the parent's runtime, although it would still run in its own process. It is rare and only affects the wording, so it is fine as a follow-up: the check could also skip the note when the run's profile can differ from its parent's, the same _aws_profile_split_possible test _sharing_plan applies.
Problem / Motivation
Goal: Tell users and agents that a Subagent Model or Subagent Effort pin starts every subagent in its own runtime, about 0.55 GB of memory each, where they choose the pin and where they spawn.
On a 16 GB Mac, four pinned subagents added about 2.2 GB and pushed the host into swap (#23484). Any model or effort pin turns session sharing off for every subagent. Each one then starts its own
kiro-cli-chatplus three MCP servers. Nothing in Settings or in thespawn_runreply says so. The role-model help even recommends a pin to save credits.Why it matters
A user who pins a cheaper subagent model to save credits pays a hidden ~0.55 GB per subagent. On 16 GB machines that makes KiroCrew close to unusable while subagents run, and the user only finds the cause in Activity Monitor.
Not a goal
What changed (motivation → approach → change)
Users pick a pin without seeing its memory cost, because sharing silently turns off. This PR states the cost at the two places a pin is chosen or used.
website/src/i18ncatalogs)agent.role_models/agent.role_effortshelp (config/sections_agent.py,config-baseline.json)subagentpinPOST /api/spawnreplyruntime_notekey when a per-call or role pin appliesspawn_runreceipt (mcp_tools/spawn.py)ℹ <ids>: …line per batch from that keyThe reply reads the run's own
_sharing_plan, the one decision the start and admission already take: the note is added when that plan carries a model or effort, so it covers per-call values, role pins and routed models, and cannot drift from the rule. Its text,PINNED_RUNTIME_NOTE, lives insubagent_parts/model_choice.py, reaching the handler (dashboard/messaging_api/spawn.py) throughsrc/kiro_crew/subagent.pyand thedashboard/handlers/messaging.pyfacade. It is reporting only and never changes a start.Backwards compatibility
Compatible: the
runtime_notekey is additive and optional, and an older client ignores it. No start, share decision or default changes.Removes nothing: the diff only adds text, one optional reply key and one receipt line.
Tests
test/test_spawn_pinned_runtime_note.py:POST /api/spawnadds the key when the run's sharing plan carries a model, an effort or both, omits it for a plan with neither (shared or dedicated for another reason), reads the plan of the run it just spawned, and never fails the spawn on an unreadable plan; the receipt renders it once per batch and never ahead of anError:first line.website/src/test/ChatPanel.subagentPinCost.test.tsx: the Subagents section shows the cost line after its heading.Proof: not provable -- other: the fix adds a new helper, so reverting every production hunk makes the new test file fail at import (prove.py INCONCLUSIVE, collection only)
Manual verification
N/A for a live run: unit coverage pins the reply key and the receipt line, and nothing changes how a run starts. The Settings line was checked by eye in the built SPA, dark and light (see Screenshots).
Screenshots / video
Settings → Chat → Models → Subagents, captured from the built SPA with the shared gateway-free API stub (
website/scripts/lib/stub-dashboard-api.mjs). The new line is the second muted line under the heading.Dark:
Light:
Related Issues
Part of #23484
Sibling sweep
Swept:
git grep -n "role_model_auto_hint\|role_effort_hint\|model_for_spawned_sub_agents" -- website/src srcSibling: website/src/pages/settings/ChatPanel.tsx -- changed here -- the Background section shares the hints but a background pin starts no subagent runtime
Sibling: src/kiro_crew/mcp_tools/spawn_parts/schemas.py -- not affected -- the
reasoning_effortfield already says it forces the dedicated processPattern harvest
Not generalizable: the cost is specific to the subagent sharing plan; the general memory fix is tracked in #23509.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)