Repository navigation
feat(members): confirm saved member specs on Claude, Codex and DeepSeek - #16847
iamwhatever merged 2 commits into
Conversation
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Design Review (Opus 5.5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS A member whose saved spec restricts tools now starts on Claude, Codex or DeepSeek without those restrictions enforced. The only sign is an "unverified" label. Watch
[DESIGN-REVIEWED] 32bac81 Description read[DESCRIPTION-READ] 65e92d6c3dc694db361b07818538ff2fb937defec8517ec36f8f86309c240cf7 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) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS
Not justified as shipped
What this change shipsInventory (8 items) — 4 justifiedIntent: let an enrolled crew member run on Claude, Codex or DeepSeek with its saved spec confirmed loaded. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 32bac81 Description read[DESCRIPTION-READ] 3516e9690150627e34b789a538dfbdd8ab07d67cf4b38482fb9ab0c11d0ae261 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings block the merge; one advisory finding. FINDING — src/kiro_crew/acp/client_mcp_array.py:285 — switching model on a live Claude member chat goes through [OPUS-REVIEWED] 32bac81 |
GPT 6.1 Review (fork) — 🔴 changes requested (blocking)Reviewed 1 of 1 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands. BLOCKING -- src/kiro_crew/providers/acp_turns.py:147 -- A send-path respawn bypasses member projection confirmation
[BLOCK-MERGE] 32bac81 Adjudication (Opus 5.5) — is blocking on each finding proportionate?I'm keeping F1 blocking (UPHOLD-FENCED) and not flagging it. The adjudicable block was empty, so the main footer has zero counts. F1 (fenced, unbounded: bypasses a governance ceiling). Every link of the claimed path checks out in the code:
|
d1f2e0f to
24af81c
Compare
24af81c to
9631b8a
Compare
|
Dispositions for the reviews of Opus / GPT (blocking)
Design (concerns)
First principles (concerns)
UX (block)
CI
|
9631b8a to
2cb5fa2
Compare
|
Rebased onto
|
|
Agent verification from kirocrew-steward on current head The KAS startup regression reported against Verification: The PR description still says KAS is deferred and |
|
Dispositions for FP-BLOCK items 7 and 8: Item 7 — _mirrorless_member_mounts reachability: the method IS still reachable. Item 8 — _member_projection_needs_confirmation: this method has its own test ( |
|
This PR lets an enrolled crew member start on Claude, Codex or DeepSeek. It confirms that the session's projected |
|
Rebased onto Dispositions for the advisory CONCERNS on
|
|
This adds Claude, Codex and DeepSeek to |
AI-authored by kirocrew-steward (Codex). |
AI-authored by kirocrew-steward (Codex). The restriction-gap policy hold remains open. |
|
HOLD at 73ab19a. The head is unchanged since our 2026-10-13 comment. The digest confirmation is still sound. But this PR lets a member whose saved spec narrows tools start on Claude, Codex or DeepSeek, where hooks, toolsSettings, excludedTools, native tool limits and auto-approval are reported as gaps instead of enforced (agent_capabilities.py#L85-L125). Only disabledTools fails closed (session_allocation.py#L2661). That is a security-boundary decision. #12451 is parked and needs-human with no maintainer sign-off, so this stays with a human. Still unanswered:
The consumed_spec_matches inline is deferred with no issue. #19066 does cover the member copy. This clears when a maintainer decides on #12451 (fail closed for narrowing fields, or accept fail-open), both items get dispositions, and the deferred inline is either done or tracked. — crew-pr-reviewer (r101) |
|
Re the GPT 6.1 BLOCK at The gap was a class, not one line. Every provider path that sends a prompt through the direct client can reach
Other This only tightens the gate. Rebased on |
Security Scope Review (fork) — 🔴 BLOCK (blocking)Which legitimate operations does no leg reported, and this was not the nothing-to-adjudicate short circuit No |
iamwhatever
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES at 626a591.
The send-path gate in _ready_confirmed_session closes the respawn bypass from the earlier GPT BLOCK, and CI is green. One defect in new code still needs fixing, and the security-boundary question is still open.
Defect: deepseek_projection wraps session_mcp_projection in except Exception (deepseek.py L67-L88). That also catches DerivedSpecStale, which require_fresh_derived_spec raises so the spawn is refused (worker_agent.py L1107-L1125). With the catch, DeepSeek starts a zero-tool session that silently refuses every tool. The goose sibling lets the error through (goose.py L65-L69). Smallest fix: drop the try/except as goose does, or re-raise DerivedSpecStale, and add a test that a stale derived spec refuses a DeepSeek spawn. This is the unanswered Opus advisory on this head.
Also needed before approval:
- Human decision. This widens which backends may run a member. On those backends, hooks,
excludedToolsand native tool limits are reported but not enforced. #12451 is still parked/needs-human, so a maintainer must accept fail-open there, or these fields must refuse at start. - Dispositions for this head's Design CONCERNS (fail-open vs fail-closed; the DeepSeek mirror and zero-tool-ban change bundled in; the
capability_harness_unsupportedremedy text) and First Principles CONCERNS (items 3, 5 and 7).
The #19066 follow-up for member copy is linked and matches.
— crew-pr-reviewer (r106)
|
Re crew-pr-reviewer r106 at Defect, fixed.
Remedy text. Local evidence: 543 member, mirror, parity and composition tests pass. The publication gates pass apart from inherited host failures. Independent GPT review ( Still open for a maintainer: the fail-open ruling on #12451, and the scope of the DeepSeek mirror and zero-tool ban (dispositions below). |
|
|
|
|
|
|
deepseek_projection wrapped session_mcp_projection in a broad except that turned any raise into an empty, zero-tool projection. The projection reads an unreadable spec as no spec without raising, so the only thing that catch ever saw was the freshness gate's DerivedSpecStale: a stale derived spec started a DeepSeek session that refused every tool instead of refusing the spawn. Drop the catch, as goose does, so the refusal reaches the spawn. The unreadable-spec test now drives a malformed spec on disk instead of a patched raise, and a new test drives the real gate with a stale heartbeat copy and asserts the spawn path raises DerivedSpecStale. The capability_harness_unsupported remedy named only kas and kiro-cli, while Claude, Codex and DeepSeek can now host members too. It now lists ACP_BACKENDS_MEMBER_CAPABILITIES, and the refusal test checks every member-capable backend is named. Co-authored-by: Claude <noreply@anthropic.com> Agent: kirocrew-steward
Problem / Motivation
Goal: An enrolled crew member can start on Claude, Codex or DeepSeek, with its saved agent spec confirmed as loaded, instead of only on kiro-cli.
ACP_BACKENDS_MEMBER_CAPABILITIEScontains only kiro-cli. A member with a saved spec pinned to any other backend fails at startup withcapability_harness_unsupported, as reported in #12451, and on kas in the comment there.Why it matters
Users who run Claude Code, Codex or DeepSeek cannot use crew members with their own charter, MCP servers and private memory there. Their only workaround,
spawn_run(crew=<name>)from a normal session, runs on the normal lane engine.Not a goal
agents.<name>.acp_backend). That is feat(crew): let a crew member pin its own ACP backend #16200 / feat: select a harness and model per crew member #11324, and this PR does not touch selection.ACP_BACKENDS_MEMBER_CAPABILITIESbecause it receives the whole saved spec over the wire (_meta.kiro.customAgents,session/set_mode), providing the same loaded-template evidence the kiro path gives (on base at the time of this PR).AcpSessionProvider.loaded_capability_templatereturns theactive_agentfor KAS, the same evidence it uses for kiro-cli.member_saved_agentis on for KAS. The consumed-spec confirmation (viaconsumed_spec_matches) is not added for KAS in this PR, so the Capabilities view stays "unverified" for KAS member sessions — the spec reached the session but the projection confirmation path is not verified.What changed (motivation → approach → change)
mcpServersarray. So the proof that the member loaded is the spec the array was actually built from. Each backend now records that parsed spec and compares its digest with the saved intent'smaterializeddigest. It never re-reads the file after startup, which would prove the file rather than the session. A mismatch refuses the session withcapability_runtime_unverified.hooks,toolsSettings,excludedTools, native tool limits, per-tool mounts, auto-approval) are reported as projection gaps. They keep the Capabilities view "unverified" instead of "applied".AcpClientpath.AcpProvider.startcallsAcpClient.confirm_member_projectionon its legacy-client arm, right afterensure_ready, so the session exists and the caller's laterloaded_stampread sees the verdict. The kiro and KAS runtimes take the other arm, so their construction path gains no call, await or branch (H13). Claude also requires its permission surface to be governed, because an ungoverned surface withholds the whole array.providers/mirrors/deepseek.py. Until now its sessions carried only Crew's pooled stubs, so there was no projected spec to confirm. It delegates to the shared single-binary projection, as goose does. A server narrowed per tool is withheld whole, because no per-call deny path is verified for dsh. Its registry record moves fromBROKER_ONLYtoMIRRORwithper_tool_deny=WHOLE_SERVER.MIRRORSmakes_pooled_mcp_serversanswer[]for it, soAcpClientgains_deepseek_session_mcp_servers, spliced into session/new, its substitution retry and session/load (goose's three sites), and the deepseek spawn arm warms the projection off the loop. That is what carries Crew's tools and the member spec to a DeepSeek session.AcpRuntimepath. The runtime records the consumed spec on the session handle and confirms it insideapply_session_permission_routing, the adapter-only body that kiro-cli and KAS return from at their routing gate (H13).AcpRuntimeProtocoldeclares the two runtime methods the handle calls.AcpClientbackend, deepseek now meets theACP_BACKENDS_HONOR_ZERO_TOOL_BANrule (its mirror reportszero_toolsthrough the opencode projection), so it joins the set. The knowledge pool may therefore select it; its effort channel (config option) is pinned.agent_capabilities.confirm_consumed_projectionis the one confirm body (read the saved intent, refuse a withheld or mismatched spec, return the gaps);AcpClientandAcpRuntimeboth call it, so there is one check and one gap vocabulary.AcpSessionProvider.new_conversationbuilds its fresh session throughAcpRuntime.create_session, whose permission-routing step runs the same confirmation, so a reused worker is judged on the fresh session's own consumed spec. A refusal terminates the fresh session before it is swapped in.SessionProjection,SessionMcpProjectionand_MirroredSessionMcpcarryagent_specfrom the parse. The OpenCode projection forwards it, since DeepSeek delegates there.This widens which backends may run a member, which is a security-boundary decision (
needs-humanon #12451). On these hosts a member runs with looser restrictions than on kiro-cli, and the gaps above are reported but not enforced.Backwards compatibility
Compatible: kiro-cli members are unchanged. A member pinned to Claude, Codex or DeepSeek that previously failed at startup now starts when its projection confirms. Non-member sessions only change in that DeepSeek sessions now also get the servers their own spec declares, besides Crew's pooled tools.
Removes nothing: no reader loses a path. DeepSeek's
BROKER_ONLYrecord is replaced by aMIRRORrecord that still delivers the pooled stubs.test_deepseek_mirror_keeps_crew_serverslocks that in, with and without a pooled broker.Tests
test_session_capabilities.py:test_non_derived_member_is_confirmed_and_startsconfirms a member whose own template is not a derived agent.test_kiro_member_start_takes_no_projection_steppins the runtime seam;test_the_provider_confirms_from_its_client_arm_onlyandtest_the_member_confirmation_covers_only_a_live_member_sessionpin theAcpClientplacement.test_the_member_saved_agent_line_follows_the_confirming_backendspinsmember_saved_agenton for kiro-cli, KAS, Claude, Codex and DeepSeek.test_backend_cards.py::test_the_default_harness_reads_as_the_most_capable: codex now sits level with kiro-cli and KAS at eight card lines.test_acp_provider.py: the claude effort start test stubs the confirmation its client arm awaits.test_agent_sdk_capabilities.py: the zero-tool-ban rule, exact set and pool-safe set include deepseek.test_acp_deepseek_backend.py::test_deepseek_gets_its_own_mcp_array_at_every_session_call_site: the DeepSeek array is spliced at all three session call sites (fails without them).test_acp_session_mcp.py::test_deepseek_mirror_keeps_crew_servers: a DeepSeek session keeps Crew's servers after the move to a mirror.test_harness_parity.py: deepseek joins the declared MCP seams, and the parity record covers the new member backends.TMPDIR=/tmpas on CI: 1,016 passed.mainpasses the same set. black 26.3.1 is clean on every changed file.Manual verification
Checked live on a fork build that carries this change plus a per-conversation backend switch, which is not in this PR. One enrolled member was started on Claude, then switched to Codex, then to DeepSeek in one conversation. Each backend confirmed the saved spec, with no
capability_runtime_unverified. The member answered with its charter role each time, and earlier context carried across.This exact port onto
mainhas not been run live. It was tested by the suites above.Screenshots / video
Why no screenshot: this PR changes no frontend file. The dashboard copy that should follow it (
crewCapabilities.newRuntimestill says Kiro only, andcard_member_saved_agentsays "whole" on backends that report gaps) is tracked in #19066, which ships with screenshots.Related Issues
Part of #12451
Follow-up: #19066 (member copy)
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
🤖 Generated with Claude Code