Repository navigation
fix(spawn): backport generated-spec roster fix to release/0.8.0 - #15314
Conversation
|
Local test evidence for Checkout: The same change on |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm byte parity with [DESIGN-REVIEWED] bdaeec8 |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify #15271 is merged on What this change shipsInventory (7 items) — 6 justifiedIntent: FIX (backport) — stop sub-agent spawns on 0.8.0 failing because rosters offered the side turn's generated
[FIRST-PRINCIPLES-REVIEWED] bdaeec8 |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
Answering the Design and First Principles verification asks on
|
Opus 5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
0d98d90 to
7d0a127
Compare
|
Opus 5's advisory on
Local test evidence for |
7d0a127 to
233814f
Compare
A side turn publishes <agent>--readonly.json into ~/.kiro/agents, the only directory kiro-cli loads specs from. Every spawn roster read that directory unfiltered, so spawn_run's "Valid names right now", spawn_list and the unknown-agent refusal offered the read-only spec, and the gate accepted it. The child's kiro-cli, which lists agents only at process start, then refused the mode and told the user to run `kirocrew setup --agent-only`, which never writes that file. agent_discovery.is_internal_agent_spec recognises Kiro Crew's own generated specs (the read-only spec by its owner marker, skill-view aliases by prefix). The rosters leave them out, _validate_agent refuses a named one with its own code (agent_internal) and names the base agent, and an app no longer owns a spec derived from its agent. The three "Agent mode ... is not available" refusals explain a derived read-only name instead of pointing at setup. (cherry picked from commit 5c4f8a5)
233814f to
bdaeec8
Compare
|
#15271 merged at Local evidence for The earlier Opus 5, Design, First Principles and GPT failures on |
Problem / Motivation
Goal: Ship the generated-spec roster fix (#15271) on the 0.8 line, so on a 0.8.0.x build sub-agents stop failing because the model picked the side turn's
<agent>--readonlyspec.This is a backport of #15271 to
release/0.8.0. The root cause, design and evidence are in #15271: every spawn roster offered the derived read-only spec, the gate accepted it, and the child's kiro-cli then refused the mode with a hint to runkirocrew setup --agent-only, which never writes that file.Why it matters
0.8.0.x is on the stable channel. On a 0.8.0 build, any install that has used a side reply can hand the model a sub-agent name that always fails, so sub-agent spawns fail by default until someone deletes the file by hand.
Not a goal
main.What changed (motivation → approach → change)
One commit, following the release-branch backport shape of #11339, #11645 and #15151 (source SHA as a
cherry picked fromtrailer):mainfix(spawn): backport generated-spec roster fix to release/0.8.0agent_discovery.is_internal_agent_spec; the filteredspawn_runroster,spawn_listand refusal roster; theagent_internalrefusal in_validate_agentand the wave short-circuit; the app-ownership exclusion (subagent + SpawnSDK);side_readonly_spec.unavailable_mode_explanation(keyed on the owner marker, run off the loop) at the three ACP mode refusals; the spec paragraphs insubagent.mdandside.mdThis is cut from the MERGED commit on
main(5c4f8a53a6), and every added and removed line matches it. The follow-up remedy wording, #15348, is not merged yet. It will be added here as a second commit once it lands, or backported on its own.Two import-list conflicts were resolved, and no logic changed. In
mcp_tools/spawn.py,release/0.8.0does not importformat_subagent_usagefromsubagent, so onlyis_internal_agent_specwas added. Inacp/client.py,release/0.8.0still importsis_credential_propagation_delay(main dropped it), so both imports were kept. Every other hunk applied cleanly.Backwards compatibility
Compatible, for the same reasons as #15271. Only specs carrying the side turn's owner marker (plus skill-view aliases, which discovery already hid) stop being listed or accepted, and spawning one was already failing at the child's
set_mode.Tests
The same tests as #15271:
test/test_spawn_internal_agent_specs.py(new), plus the added cases intest/test_acp_runtime.pyandtest/test_acp_set_mode_all_agents.py. On this branch the touched-module suites pass (1920 passed across the touched-module and neighbouring suites; 712 in: those three files plustest_agent_roster_shared.py,test_spawn_agent_roster.py,test_side_readonly_spec.py,test_spawn_parent_available_agents.pyandtest_app_spawn_capability.py,test_agent_spec_hardened_reads.py).Manual verification
As in #15271: reproduced against a throwaway
KIRO_HOMEwith the real publisher. The roster and gate output before and after is in that PR.Related Issues
Backport of #15271. Supersedes #15272 (same commit, re-opened from a same-repo branch because fork PRs into release branches do not start the review lanes).
Pattern harvest
Rule candidate: review-prompt
Pattern: a spec Kiro Crew writes into the shared
~/.kiro/agentsregistry for its own machinery must be recognised by one predicate (is_internal_agent_spec) at every roster and gate that reads that directory.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement