Skip to content

feat: run the kiro cli harness on v2 and kas on v3 - #31801

Closed
buluoray wants to merge 1 commit into
mainfrom
crew/slack/kiro-cli-v2-kas-v3
Closed

buluoray wants to merge 1 commit into
mainfrom
crew/slack/kiro-cli-v2-kas-v3

Conversation

@buluoray

@buluoray buluoray commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Picking Kiro CLI always runs kiro-cli's V2 engine and picking KAS runs V3, with Settings saying which is which and a clear notice where V2 is gone.

A stored Kiro CLI choice (agent.acp_backend: "kiro") moved onto Kiro Crew's KAS path whenever the gateway's probe found kiro-cli's v3 engine, so a person who picked Kiro CLI could be running V3 without choosing it. The team decided on 2026-11-06 that each choice means one engine: Kiro CLI is V2, KAS is V3.

Why it matters

People pick a harness to get a specific engine. Hidden rerouting made "Kiro CLI" mean V3 on most hosts and gave them no way back to V2 from the UI. kiro-cli supports V2 until the end of January, so a Kiro CLI choice needs to keep working on V2 until then and fail clearly after.

Not a goal

  • Changing what KAS (or no choice) runs.
  • Changing first-run setup. Its picker shows no per-choice descriptions, so it gets none.
  • A setting or toggle: there is no new config key.
  • Changing the KAS route rules (bundle vs kiro-cli relay).

What changed (motivation → approach → change)

Reported symptom: with Kiro CLI selected, sessions ran on KAS, which does not read an agent's toolsSettings, so the agent's allowed shell commands and write paths stopped applying and every shell command asked for approval. Users said it worked before the update.

Choice Before After
Kiro CLI, kiro-cli offers v3 ran on KAS (V3) kiro-cli acp --agent-engine v2 (V2)
Kiro CLI, kiro-cli lists v2 V2 V2
Kiro CLI, kiro-cli lists engines but no v2 bare acp, so V3 under the V2 harness, silently session refused with "This kiro-cli no longer offers its V2 engine… Choose Kiro Agent (KAS)"
KAS / no choice V3 V3 (unchanged)
  • Routing. The promotion is removed at its source: the config loader, a Bot's harness pin and the gateway's KAS floor no longer move a Kiro CLI pick, and the per-process v3 probe, its once-only bell note and the "Save Kiro Agent as my setting" callout go with it. A Bot pinned to Kiro CLI now starts kiro-cli, which cannot run a full Bot, so that pin is no longer offered (see Backwards compatibility).
  • No V2. kiro_cli.kiro_acp_engine_args raises KiroAcpV2Unavailable when the pinned kiro-cli lists --agent-engine values without v2; both launch sites turn it into the session's start error. An older kiro-cli with no engine selector, a PATH-only kiro-cli, or a probe that could not run keep the bare launch, as today.
  • Why refuse instead of running bare. Today a missing v2 means a bare kiro-cli acp, which kiro-cli 3.x serves on v3 while Crew drives it as the v2 harness (skill-view aliases, the cli.json overlay, re-filtered specs). Refusing with the fix named is the least surprising outcome and switches nothing behind the user's back.
  • UI. Settings → Agent Harness shows "Runs the Kiro CLI V2 engine." beside Kiro CLI and "Runs the V3 engine." beside Kiro Agent. When Kiro CLI is the pick and kiro-cli has no v2, a warning notice says so with a Use Kiro Agent button, and the Kiro CLI row says "Can't start" instead of "ready to use" (GET /api/acp-backends carries kiro_cli_v2_missing, read through agent_sdk.kiro_cli_v2_missing).
  • Doctor. A Kiro CLI pick on a kiro-cli without v2 prints a "Kiro CLI harness" row and an issue; the KAS block is for a KAS pick only.
  • Docs. New decision entry docs/decisions/2026-11-06-kiro-cli-runs-v2-and-kas-runs-v3.md supersedes the 2026-10-28 entry; specs (harness-parity H1/H17, config, acp-client, slack-gateway, crew-mode) and user docs (configuration, coming-from-kiro-cli) updated.

builder-security checked: GET /api/acp-backends gains one read-only boolean on the existing owner-only route; no listener, bind, auth or route change.

Backwards compatibility

Breaking: a stored agent.acp_backend: "kiro" on a v3 kiro-cli now runs V2 instead of KAS. That is the decision; users who want V3 pick Kiro Agent. A Bot pinned to kiro now starts kiro-cli, as such a pin already did on any host where kiro-cli had no confirmed v3: kiro is no longer offered as a Bot pin, and a stored one cannot open its own workers until the Bot's harness is changed. Whether a stored Bot kiro pin should instead run on KAS is open for the maintainer.

Reader: website/src/pages/developer/AgentBackendTab.tsx:kiroPickRunsOnKas -- crew page -- removed with the callout it drove; the panel reads kiro_cli_v2_missing instead (AgentBackendTab.engineHints.test.tsx)
Reader: src/kiro_crew/kiro_on_kas_notice.py:schedule -- release -- removed with its bell note; nothing else imported it
Reader: src/kiro_crew/cli_chat.py:_chat -- chat -- loads the stored pick as Kiro CLI without a probe (test_a_stored_kiro_pick_runs_kiro_cli_in_cli_chat)
Reader: src/kiro_crew/crewmate_harness.py:CrewBackendPin.resolve -- crew page -- a kiro pin resolves to Kiro CLI (TestAKiroPin::test_a_kiro_pin_keeps_the_kiro_cli_launch)

Tests

  • test/test_kiro_acp_engine_pin.py::test_a_kiro_cli_pick_launches_its_agent_on_v2_with_tools_settings_intact: Kiro CLI selected while KAS is selectable loads as Kiro CLI, launches --agent-engine v2 --agent <name>, and the skill view it launches under keeps the agent's toolsSettings (allowedCommands, allowedPaths) unchanged. Fails when the pick is routed back to KAS.
  • test/test_kiro_acp_engine_pin.py: a kiro-cli whose engine list lacks v2 raises with the KAS fix, and the Kiro harness launch refuses with that text; no selector stays bare; unknown is not "missing".
  • test/test_acp_backend_kas.py::TestAKiroCliPickRunsKiroCli: a stored Kiro CLI pick loads and builds a Kiro CLI provider while KAS is selectable, on the bundle route, and under a KAS denial.
  • test/test_cli_chat.py: kirocrew chat runs a stored Kiro CLI pick on Kiro CLI and spends no v3 probe.
  • test/test_cli_doctor_agent_auth.py::TestDoctorKiroCliPick: the no-v2 row and issue, quiet otherwise.
  • test/test_crewmate_harness.py: a kiro pin keeps the Kiro CLI launch and is not offered.
  • website/src/test/AgentBackendTab.engineHints.test.tsx: the engine lines beside Kiro CLI and Kiro Agent only, the no-V2 notice and its one-click switch, and no engine line in first-run setup.
  • Mutation checks: with the refusal replaced by return [], both refusal tests fail; with a stored Kiro CLI pick routed back to KAS in the loader, all three TestAKiroCliPickRunsKiroCli routing tests fail.

Run locally, one process, no -n: the backend files above plus test_kas_cli_floor, test_kas_withheld_credentials_notice, the doctor facade/parts tests, test_enterprise_harness_floor, test_kas_permissions, test_harness_parity, test_flake_pattern_ratchet, test_gateway_process_entry, test_kas_route: 1303 passed; 2 failures are host-dependent (a ~/.mcp.json on this host trips the Copilot launch test, and a configured dashboard port) and touch no changed code. Frontend: tsc, and vitest over the Agent Harness, first-run setup, i18n and settings-registry tests: 3254 passed.

Manual verification

Captured Settings → Agent Harness in the three states above against fixture responses, and read each frame.

Screenshots / video

Settings → Agent Harness, fixture-backed capture:

Kiro CLI in use:

Kiro CLI in use

Kiro Agent in use:

Kiro Agent in use

Kiro CLI on a kiro-cli without V2:

Kiro CLI without V2

Related Issues

Supersedes the routing from #25350. Overlaps #30683 (the v3 probe for a Kiro CLI pick), which this change makes unnecessary.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 6, 2026 20:58
@buluoray
buluoray requested a review from tim-finnigan November 6, 2026 20:58
@buluoray
buluoray enabled auto-merge (squash) November 6, 2026 20:58
@buluoray
buluoray disabled auto-merge November 6, 2026 20:59
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of d505d2caec3a067daffd3d32959069d727fda18b — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. A maintainer-recorded decision supersedes the old routing, the refusal fires only when kiro-cli lists its engines and v2 is not among them, and the Bot-pin break is listed and accepted.

Notes

  • A stored Bot kiro pin can no longer open its own workers, and the PR leaves open whether it should run on KAS instead. Get the maintainer's answer before merge. Otherwise those Bots stay stuck until someone notices, and no notice points at the fix the way the Settings warning does for the main pick.
  • src/kiro_crew/config/validation.py:787 still has a comment saying a Kiro CLI pick runs on KAS (KIRO_SELECTION_BACKEND). That symbol is gone, so the comment now describes routing that no longer exists.

[DESIGN-REVIEWED] d505d2c

Description read

[DESCRIPTION-READ] 389c6d6205a99b31925d50e517fa6137ce02de183c4106eeb2e6cba07ceb8ba1

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🔴 BLOCK

Premise-level review of d505d2caec3a067daffd3d32959069d727fda18b — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: BLOCK

Product-shape change without accepted RFC: a stored Kiro CLI pick no longer runs on KAS, sessions on a kiro-cli without v2 are now refused, and the KAS callout and bell note are removed. No RFC on the base commit records this.

Notes

  • Item 5 — rides along: the PR says it "is open for the maintainer" whether a stored Bot kiro pin should run on KAS. With this change such a Bot "cannot open its own workers."

What this change ships

Inventory (8 items) — 5 justified

Intent: someone who picks Kiro CLI gets V2 and someone who picks KAS gets V3, with no hidden rerouting. This is an ADDITION (a changed default plus a new refusal).

  1. A stored Kiro CLI pick on a v3 kiro-cli now runs V2, not KAS: product shape, no recorded decision
  2. A Kiro CLI session on a kiro-cli without v2 is refused instead of launching bare: product shape, no recorded decision
  3. The "Save Kiro Agent as my setting" callout and the once-only bell note are removed: product shape, no recorded decision
  4. Settings shows which engine each choice runs (V2 or V3): justified
  5. A Bot can no longer be pinned to Kiro CLI, and a stored kiro pin loses its workers: rides along
  6. A no-V2 warning with a Use Kiro Agent button, and "Can't start" on the Kiro CLI row: justified
  7. kirocrew doctor prints a "Kiro CLI harness" row when v2 is missing: justified
  8. GET /api/acp-backends gains kiro_cli_v2_missing, read by one consumer, AgentBackendTab: justified

Blockers

product-shape change without accepted RFC: what a Kiro CLI pick runs, and the new refusal — product shape
Trigger: items 1–3. The decision entry docs/decisions/2026-11-06-kiro-cli-runs-v2-and-kas-runs-v3.md is added by this diff, so it is a proposal, not a record. It supersedes the base entry 2026-10-28-a-kiro-cli-choice-runs-on-kas.md, which says the opposite. On the base RFC list, rfc-kas-own-engine-route.md (implemented) only governs KAS spawn routes. Its non-goals list moving a Kiro CLI pick off kiro-cli, but it never covers the V2 pin or the refusal. The other harness RFCs on the base are draft.
Outcome: every user with a stored "kiro" choice gets a different engine and a new failure mode, and no decision that the repository accepts is on record.
Clears when: an RFC covering "Kiro CLI pick runs V2 and refuses without v2" merges with a non-draft status on the base, then a push or rebase; or a maintainer posts /ai-review override first-principles d505d2caec3a067daffd3d32959069d727fda18b product-shape: <decision>.

[FIRST-PRINCIPLES-REVIEWED] d505d2c

Description read

[DESCRIPTION-READ] 28662f58223048229ba82048c1ebe27a8cbeb3ef69f3996c3a99e646aee0e52e

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of d505d2caec3a067daffd3d32959069d727fda18b — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The blind reader understood the "Use Kiro Agent" fix and said they would click it, and all three new states appear in the screenshots.

Notes

  • In the shot-03 warning banner (AgentBackendTab.tsx:1437), swap CircleHelp for AlertTriangle, the warning icon used across the rest of the app. The blind reader said "The '?' icon is an odd choice for a warning."
  • When kiroCliV2Missing is set, the Kiro CLI row still shows the green "Installed" pill and "supports 4 of 4 features". The reader said: "green and '4 of 4' look like everything is fine, but it can't start." Hide or mute those on that row.
  • engine_hint_kas "Runs the V3 engine." and engine_hint_kiro "Runs the Kiro CLI V2 engine." only differ by V2/V3, and the reader "can't tell which one is better". Say what the user gets instead, e.g. "Older engine, supported until January" vs "Current engine".

[UX-REVIEWED] d505d2c

Description read

[DESCRIPTION-READ] ed6b585f176e9abc0d31a09937f5a1af34873c2418758d732f599ba028245611

That sha256 names everything this verdict read: the PR description, plus the 6 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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed d505d2caec3a067daffd3d32959069d727fda18b — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] d505d2c

Verdict parsed from the review's SHA-scoped output markers for commit d505d2caec3a067daffd3d32959069d727fda18b.

False positive or not applicable? A repository writer can comment:
/ai-review override fable d505d2caec3a067daffd3d32959069d727fda18b false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — 🔴 changes requested (blocking)

GPT 6.1 found at least one blocking issue that must be resolved before merging d505d2caec3a067daffd3d32959069d727fda18b. 1 of 1 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands.

This comment is updated in place on each push.

BLOCKING -- docs/decisions/2026-11-06-kiro-cli-runs-v2-and-kas-runs-v3.md:5 -- Superseding the routing decision requires a maintainer override

Supersedes: 2026-10-28-a-kiro-cli-choice-runs-on-kas.md
Trigger: A stored agent.acp_backend: "kiro" on a host offering V3 passes through _read_backend_choice without promotion, reaches the Kiro provider, and launches with --agent-engine v2.
Outcome: Existing choices switch from KAS to V2, or fail startup when V2 is absent, reversing the recorded contract. The governing rule explicitly blocks superseding entries pending maintainer override; the supplied adjudication covers only Bot pins.
Anchor: recorded-decisions-are-not-regressions
Fix: Link the maintainer’s on-record decision in Evidence and obtain an explicit override covering the routing reversal and new session refusal.

[BLOCK-MERGE] d505d2c
[GPT-REVIEWED] d505d2c

Adjudication (Opus 5.5) — is blocking on each finding proportionate?

F1 (fenced): src/kiro_crew/config/loader_builders.py:503-510 passes a stored agent.acp_backend: "kiro" through without moving it onto KAS. Only member_acp_backend is remapped. So the reversal reaches every existing Kiro CLI choice. That is the intended effect, not a rare edge case, so it can't be FLAGged as extreme. The base rule .review-base-rules/AUTOSDE.yaml:852-890 (blocking: true) says any Supersedes: entry is flagged by design and lands only with a maintainer override. The entry's Evidence at docs/decisions/2026-11-06-kiro-cli-runs-v2-and-kas-runs-v3.md:20 links no on-record artifact, which the same rule also requires.

[ADJUDICATION] d505d2caec3a067daffd3d32959069d727fda18b total=0 uphold=0 downgrade=0
[GPT-ADJUDICATED] d505d2caec3a067daffd3d32959069d727fda18b

[ADJUDICATION-FENCED] d505d2caec3a067daffd3d32959069d727fda18b fenced=1 flagged=0
UPHOLD-FENCED F1 docs/decisions/2026-11-06-kiro-cli-runs-v2-and-kas-runs-v3.md:5 -- Every stored "kiro" choice is moved from KAS to V2 (loader_builders.py:503-510), and the blocking rule clears a superseding entry only by maintainer override; the entry's Evidence also links no on-record statement, so no rarity argument exists to pre-draft.
[GPT-ADJUDICATED-FENCED] d505d2caec3a067daffd3d32959069d727fda18b

False positive or not applicable? A repository writer can comment:
/ai-review override gpt d505d2caec3a067daffd3d32959069d727fda18b false-positive: <reason, 20 to 500 characters>

@buluoray
buluoray force-pushed the crew/slack/kiro-cli-v2-kas-v3 branch from 43ee2fe to 6e2bab8 Compare November 6, 2026 22:05
@buluoray

buluoray commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author
  • The no-V2 state contradicts itself on the same screen

fixed in 6e2bab8: with kiro_cli_v2_missing set, the Kiro CLI row's detail and its screen-reader status read "Can't start: this kiro-cli no longer offers the V2 engine." in place of "installed and ready to use", and the top notice uses the warning colour with an icon. Test: AgentBackendTab.engineHints.test.tsx asserts the row text and that "ready to use" is gone. New screenshot in the body.

@buluoray

buluoray commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author
  • docs/decisions/2026-11-06-kiro-cli-runs-v2-and-kas-runs-v3.md:18 Evidence links nothing

needs-a-decision: the Evidence line needs the maintainer's on-record statement of this decision; the entry will link that comment once it exists, and the Supersedes: flag is cleared by a maintainer override, not by code. The index-table note is fixed in 6e2bab8 (two cells again).

@buluoray

buluoray commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author
  • src/kiro_crew/crewmate_harness.py:171 Persisted Kiro Bot pins strand their workers

needs-a-decision: a stored Bot kiro pin now starts kiro-cli, as it already did on main wherever kiro-cli had no confirmed v3, so its workers are refused there today too. Mapping such a pin to KAS instead changes which harness every kiro pin is offered and judged as (13 existing tests encode the current rule), so it is put to the maintainer rather than widened here. The PR body's claim of an H17 KAS fallback for workers was wrong and is corrected in 6e2bab8.

@buluoray
buluoray force-pushed the crew/slack/kiro-cli-v2-kas-v3 branch from 6e2bab8 to 64a6044 Compare November 6, 2026 22:44
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 6, 2026
A Kiro CLI choice always launches kiro-cli acp --agent-engine v2 and
never moves onto the KAS path; KAS runs v3 as before. A kiro-cli that
lists engines without v2 refuses Kiro CLI sessions with the KAS fix
named, and Settings and doctor say the same. Settings names each Kiro
harness's engine. Supersedes the 2026-10-28 decision.
@buluoray
buluoray force-pushed the crew/slack/kiro-cli-v2-kas-v3 branch from 64a6044 to d505d2c Compare November 6, 2026 22:46
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

Closing per the maintainer's decision: the Kiro CLI harness choice keeps running on Crew's KAS path (customAgents over the wire) rather than native CLI v2, so this direction is not being pursued.

@buluoray buluoray closed this Nov 10, 2026
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant