Skip to content

feat(acp): default new installs to KAS - #20359

Merged
iamwhatever merged 1 commit into
mainfrom
fix/default-kas
Oct 15, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
fix/default-kas

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Every install with no stored Kiro CLI choice uses KAS; Kiro CLI is used only when config.json stores "kiro".

Today agent.acp_backend: "" means Kiro CLI, and that is also what every full save writes. So config cannot tell "the user picked Kiro CLI" apart from "the user never picked", and nearly every existing install holds "". A default change keyed on an absent key alone would leave almost all existing installs on Kiro CLI.

Why it matters

KAS is the harness the org has decided every user should start on. Without a stored value that means "Kiro CLI" and nothing else, the default cannot move existing installs, and a real Kiro CLI pick cannot be told apart from no choice.

Not a goal

What changed (motivation → approach → change)

The stored harness value now has one meaning per spelling, and "" joins "absent" as "no choice":

agent.acp_backend / agent.member_acp_backend on disk Harness used Saved back
absent or "" KAS (Kiro CLI floor when policy removes KAS), no warning unchanged
"kiro" (user picked Kiro CLI) Kiro CLI "kiro"
"kas", "claude", ... that harness as written
typo, denied, unservable, wrong type Kiro CLI floor, with a warning as written

The runtime id for Kiro CLI stays "" (ACP_BACKEND_KIRO). Only the config boundary translates. agent_sdk/backends.py adds STORED_BACKEND_KIRO = "kiro" (equal to the policy id) and two helpers: backend_from_stored for loads, and backend_to_stored for everything that shows or writes the setting.

config/loader.py reads both keys through _read_backend_choice. to_dict() emits the stored spelling, so kirocrew config get, the dashboard config response and the schema enumValues all say "kiro". save() writes both keys back exactly as the file holds them, so it never invents a choice and never replaces a policy-denied "kas" with the floor. config/validation.py maps a present non-string to "kiro" with a warning.

On boot, platform/bootstrap.py re-resolves an undeclared value as absent. knowledge/llm_pool.py reads the stored value through the same helper. The dashboard PATCH allowlist (dashboard/handlers/core.py), the agent schema enum (dashboard/handlers/agents.py), the /api/acp-backends rows (acp_backend_status.py) and the error text in acp/runtime.py and dashboard/chat_runner.py all use "kiro". acp_backends.py re-exports the new names. validation.py leaves .github/black-baseline.txt because it is now black-clean.

In the website, acpBackend.ts sets ACP_BACKEND_KIRO = 'kiro', and a new configuredAcpBackend() reads ''/absent as KAS. KiroPrerequisiteGate.tsx and AgentBackendTab.tsx follow it: KAS is listed first and reads "Default.", Kiro CLI has no Experimental badge, and picking Kiro CLI PATCHes "kiro". config-baseline.json, configuration.md, agent-spec-fields.md, harness-parity.md (H1, H3), agent-host-contract.md and config.md state these rules.

The org leaders decided the KAS default; there is no RFC.

Backwards compatibility

Breaking: a stored agent.acp_backend: "" or agent.member_acp_backend: "" changes meaning from Kiro CLI to "no choice", which resolves to KAS. On the base, every full save wrote "", so almost every existing install moves to KAS on upgrade. That includes users who explicitly picked Kiro CLI, because that pick was stored as the same "". They pick Kiro CLI again (stored as "kiro") to go back. This is intended.

Breaking: on native Windows the default chat moves from Kiro CLI's built-in sandbox to KAS, which runs unconfined under the platform default (it can read .aws and .ssh). With sandbox_allow_unsandboxed_exec=false declared, a KAS chat is refused with a message naming that setting. Picking Kiro CLI keeps the sandboxed path. This tradeoff is accepted by @zejiangg; docs/guides/windows-install.md states it, and cli_doctor.py describes KAS as the default.

Breaking: /api/acp-backends row ids and the dashboard/CLI config surfaces report Kiro CLI as "kiro" instead of "". The backend recheck still accepts "". Inside this repo only the dashboard reads these ids, and it is updated.

Reader: KiroCrewConfig.save() no longer persists an in-memory harness assignment; nothing in src/ relies on that (grep), and harness picks go through the key-level writers (config set, dashboard PATCH).

Writer sweep re-run on fresh origin/main (37fa963): no other writer of agent.acp_backend / agent.member_acp_backend found.

Tests

  • test/test_acp_backend_kas.py: stored "" and absent load as KAS with no warning, for both keys; "kiro" loads Kiro CLI and to_dict() returns "kiro"; config set agent.acp_backend kiro stores "kiro" and config get prints it; a full save() keeps the file's values; the dashboard response and PATCH speak "kiro".
  • test/test_agent_backend_governance.py: under a KAS-denying policy, absent or "" takes the floor silently on load, on a home with no config file, and on the boot re-resolve; a stored denied "kas" warns and stays "kas" after save(); recheck with "kiro" probes Kiro CLI.
  • test/test_harness_parity.py: H1 default is KAS; H3 bad explicit values degrade to Kiro; the stored token equals the policy id.
  • website/src/api/acpBackend.test.ts, website/src/test/AgentBackendTab.test.tsx and website/src/test/KiroPrerequisiteGate.agentChoice.test.tsx: ''/absent shows KAS in use, "Default." sits on KAS only, picking Kiro CLI PATCHes 'kiro'. The other gate and harness frontend test files (17 in all) use 'kiro' for a Kiro CLI pick.
  • Kiro CLI fixtures: tests of kiro-cli-only paths pin acp_backend: "kiro" through pin_kiro_cli_harness() in test/chat_test_helpers.py. This covers test_eager_spawn.py, test_cli.py, test_agent_capabilities_stop_following.py, test_crew_fired_spec_hooks.py, test_crew_log_order.py, test_dashboard_chat.py, test_dashboard_chat_turn_wiring.py, test_discord_resumed_busy.py, test_recovery_l1_chat_runner.py, test_todo_pill_resync.py, test_agent_welcome_message.py, test_manual_compact_gate.py and test_chat_runner_coverage.py.
  • website/electron/test/packaging.test.js: the installer-copy pin checks that DEFAULT_ACP_BACKEND names KAS or Kiro and is the field default. The installer's "requires Kiro CLI" copy stays true because KAS runs over the kiro-cli ACP relay.
  • Run: 226 backend test files that touch a harness field, plus the config suites. The only failures also fail on unchanged HEAD on this host (sandbox-only); 21 frontend files (835 tests) pass; tsc, isort, flake8, mypy, black and the comment-history gate pass.

Manual verification

Rendered Settings > Agent Harness from this branch on a loopback dev server with stubbed APIs. With agent.acp_backend: "", KAS is listed first, marked In use and reads "Default.". With "kiro", Kiro CLI is In use and reads "Kiro CLI is installed and ready to use." with no Default or Experimental label.

Screenshots / video

Config holds agent.acp_backend: "" (an existing install after upgrade, or a new install):

Agent Harness with "" config: KAS in use and Default

Config holds agent.acp_backend: "kiro" (the user picked Kiro CLI):

Agent Harness with "kiro" config: Kiro CLI in use

First run on a fresh home with no agent.acp_backend and Kiro CLI not signed in. The default resolves to KAS, so the Kiro CLI setup gate (KiroPrerequisiteGate) is not shown; the app opens straight to the dashboard and its first-run Privacy step. The gate appears only when KAS cannot start (old kiro-cli, missing agent spec, or no sandbox). A "" home looks the same. Captured on an isolated loopback gateway with sandbox_allow_unsandboxed_exec: true, because the capture host cannot nest a sandbox.

First run with no harness configured: dashboard and Privacy step, no Kiro CLI gate

Related Issues

Closes #20171

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

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 14, 2026 15:42
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 14, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased: onto main 989a43d and folded in a fix for the Electron Shell Tests red. packaging.test.js pinned acp_backend default ""; it now pins DEFAULT_ACP_BACKEND (KAS or Kiro) as the field default. The installer copy is unchanged because KAS runs over the kiro-cli ACP relay. New head 78027e9.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 14, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased: onto main 64ece1a and folded in fixes for the head 78027e9 reds (Frontend Tests (4) acpBackend.test.ts, Backend Tests (Windows) (4) test_eager_spawn.py). A full local backend sweep against base found the same cause in more files: tests of kiro-cli-only paths built a fresh config, which now means KAS. Those tests now record acp_backend: "" explicitly. New head 1d2a081; CI re-running.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ human override accepted

@iamwhatever overrode this lane for b23d5a9c2ab3476ee9c06654c59708e6e8899a5a via /ai-review override (this commit only).

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

UX-level review of b23d5a9c2ab3476ee9c06654c59708e6e8899a5a — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

Upgrading silently moves users who picked Kiro CLI over to KAS, and nothing in the product tells them their harness changed or how to switch back.

Watch

  • Silent harness switch on upgrade. A stored "" now resolves to KAS, and the PR says "almost every existing install moves to KAS on upgrade", including people who chose Kiro CLI on purpose. No diff hunk adds a notice, so the first sign is chats behaving differently (sign-in, sandbox, approvals). On Windows the new default also runs without the sandbox. This hits most existing users once, it is easy to misread as a bug, and the fix exists only in Settings. Severity: high frequency × medium impact × one-time. Smallest fix: a one-time dismissible notice on first launch after upgrade: "New chats now use KAS. Switch back in Settings → Agent Harness."
  • "Default." doesn't explain itself. The blind reader on shot-01: "'Default.' … tells me KAS is the one picked out of the box … a guess (it's just one word with no context)". The reader also couldn't tell it apart from "(default agent)" in the Crewmate dropdown. It shows on every visit to this tab. Severity: low impact × persistent.

Suggestions

  • In pages.developer.agentBackendTab.default_harness on the KAS row, replace "Default." with "Used by new installs unless you pick another." so it reads on its own and doesn't share its meaning with the "(default agent)" label.

[UX-REVIEWED] b23d5a9

Description read

[DESCRIPTION-READ] 1f751825086d06823111d0c97b8f000f791b035fafba969cc8454aa27fb5be2d

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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — 🟡 CONCERNS

Design-level review of b23d5a9c2ab3476ee9c06654c59708e6e8899a5a — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: CONCERNS

Upgrading silently moves every stored "" install to KAS, including deliberate Kiro CLI pickers and Windows users who lose the sandbox. Nothing tells them.

Watch

  • The upgrade switches harness without telling anyone. The PR says "" "changes meaning from Kiro CLI to 'no choice'", so "almost every existing install moves to KAS on upgrade". The diff adds no boot, chat or doctor notice. Users who picked Kiro CLI find a different harness, auth flow and consent path with nothing explaining why. The PR accepts this, but nobody affected will learn of it. It is reversible per user only once they notice.
    Clears when: a one-time notice (boot log plus dashboard/doctor line) appears when a stored "" resolves to KAS, or a maintainer records that a silent switch is the intended outcome.
  • The Windows default chat now runs with no sandbox. The PR says the default chat "runs unconfined under the platform default (it can read .aws and .ssh)". Untrusted content (channel messages, web pages, fork diffs) now reaches an agent that can read credentials by default, unless the user knows to pick Kiro CLI or set sandbox_allow_unsandboxed_exec=false. One named person accepted it in the PR text; there is no docs/decisions/ entry, and the only manual check shown is the Settings UI.
    Clears when: a docs/decisions/ entry records the Windows tradeoff, or the default stays Kiro CLI on hosts where KAS cannot be sandboxed.

Suggestions

  • On Windows (or whenever KAS would run unsandboxed), make no-choice installs resolve to Kiro CLI. That keeps the rollout and avoids a default that can read credentials.

[DESIGN-REVIEWED] b23d5a9

Description read

[DESCRIPTION-READ] 3bda2b4aa6f0ec57e2b7f4da0e0197b23a6c6139ec5f756b8b0d098c21f12b22

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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ human override accepted

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

Human judgment by @iamwhatever overrides the Opus 5.5 finding for b23d5a9c2ab3476ee9c06654c59708e6e8899a5a; the recorded reason is authoritative for this commit.

[OPUS-OVERRIDE] b23d5a9

Verdict recorded from an authorized human decision for commit b23d5a9c2ab3476ee9c06654c59708e6e8899a5a.

False positive or not applicable? A repository writer can comment:
/ai-review override fable b23d5a9c2ab3476ee9c06654c59708e6e8899a5a: <one-sentence reason>

@iamwhatever

iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=4700837bae6f Product-shape change without accepted RFC: the default harness for new installs

needs-a-decision: correct, no accepted RFC records this default. Issue #20171 (tier:T3, triaged) is the request.
The diff keeps every stored choice; only a config with no agent.acp_backend moves to KAS, with Kiro CLI as the floor when policy removes KAS.
@maintainers: please rule. Approve with /ai-review override first-principles <head>: <decision>, or ask for an RFC first.

@iamwhatever

iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=691a795eb70b Item 1: DEFAULT_ACP_BACKEND = ACP_BACKEND_KAS without a recorded decision

needs-a-decision: same ruling as span 4700837bae6f. This line is that decision; it stands or falls with the maintainer ruling there.

@iamwhatever

iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=fb7c0bf59c61 Item 2: KAS listed first follows the default

needs-a-decision: same ruling as span 4700837bae6f. The order follows the default by design (default first, floor second), so it changes with Item 1.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of b23d5a9c2ab3476ee9c06654c59708e6e8899a5a and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] b23d5a9

False positive or not applicable? A repository writer can comment:
/ai-review override gpt b23d5a9c2ab3476ee9c06654c59708e6e8899a5a: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 14, 2026
@iamwhatever

iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=ae826f6fb4d7 to_dict() drops acp_backend for every serializer

fixed in ece1f97: save() strips an undeclared agent.acp_backend only on the disk write, deciding "declared" from config.json / config.local.json via acp_backend_declared() (same pattern as unsandboxed_exec_declared). to_dict() always carries the resolved harness; _agent_acp_backend_explicit and the core.py response patch are removed.

@iamwhatever

iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=06b8f13d3cf1 config get agent.acp_backend fails on new installs

fixed in ece1f97: save() strips an undeclared agent.acp_backend only on the disk write, deciding "declared" from config.json / config.local.json via acp_backend_declared() (same pattern as unsandboxed_exec_declared). to_dict() always carries the resolved harness; _agent_acp_backend_explicit and the core.py response patch are removed.
test_config_get_reports_the_default_on_a_new_install runs _run_config_cmd get on a keyless config: prints kas, exit 0.

@iamwhatever

iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=f340b161ce70 core.py response patch works around the same defect

fixed in ece1f97: save() strips an undeclared agent.acp_backend only on the disk write, deciding "declared" from config.json / config.local.json via acp_backend_declared() (same pattern as unsandboxed_exec_declared). to_dict() always carries the resolved harness; _agent_acp_backend_explicit and the core.py response patch are removed.

@iamwhatever

iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=eafc61676165 serialized document no longer carries the field

fixed in ece1f97: save() strips an undeclared agent.acp_backend only on the disk write, deciding "declared" from config.json / config.local.json via acp_backend_declared() (same pattern as unsandboxed_exec_declared). to_dict() always carries the resolved harness; _agent_acp_backend_explicit and the core.py response patch are removed.
The serialized document carries the field again; only the on-disk write omits an undeclared one.

@iamwhatever

iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=55a5292e6e0b prefer the disk-read pattern of unsandboxed_exec_declared

fixed in ece1f97: save() strips an undeclared agent.acp_backend only on the disk write, deciding "declared" from config.json / config.local.json via acp_backend_declared() (same pattern as unsandboxed_exec_declared). to_dict() always carries the resolved harness; _agent_acp_backend_explicit and the core.py response patch are removed.

@iamwhatever

iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=6343c5782084 move the pop into save() and drop the core.py patch

fixed in ece1f97: save() strips an undeclared agent.acp_backend only on the disk write, deciding "declared" from config.json / config.local.json via acp_backend_declared() (same pattern as unsandboxed_exec_declared). to_dict() always carries the resolved harness; _agent_acp_backend_explicit and the core.py response patch are removed.

@iamwhatever

iamwhatever commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=8943e548a2e6 some existing installs may switch harness silently on upgrade

answered in the body (ece1f97): on the base, save() wrote the whole to_dict(), so gateway-booted and dashboard-saved installs hold "" and stay on Kiro CLI. A config written only by key-level writers (setup wizard, config set, hand edits) has no key and moves to KAS.
That is the intended rule from issue #20171: no recorded choice means the default. Backwards compatibility now names those writer paths.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=0bc689218c90 "Default." doesn't explain itself

rebutted: the label string predates this PR; only the row it marks moved, keyed on DEFAULT_ACP_BACKEND. Copy changes are outside this PR's goal.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=742374a2298f replace default_harness copy

rebutted: label copy is outside this PR's goal; the string predates it and only its row moved.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=bb9a12f34220 The upgrade switches harness without telling anyone

rebutted: intended; @zejiangg chose that stored "" (incl. past Kiro CLI picks) moves to KAS. The Breaking line names the cohort; an in-product notice is new UI scope.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=37f2557c3c8c The Windows default chat now runs with no sandbox

rebutted: @zejiangg accepted unconfined KAS as the Windows default; docs/guides/windows-install.md and the Breaking line state it. Picking Kiro CLI (stored "kiro") restores the sandboxed path.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=083c62d7e311 Windows no-choice installs resolve to Kiro CLI

rebutted: considered and rejected by @zejiangg, who chose KAS as the default on every platform including native Windows and accepted the unconfined tradeoff.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles b23d5a9: agent: posted at @zejiangg's direction; making KAS the default harness (absent or "" stored value) is a decision by the org leaders, so no RFC is required.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=aa94225c895b stored "" (incl. past Kiro CLI picks) moves to KAS, unconfined on Windows

rebutted: not a defect; this is the contract @zejiangg chose. A one-time ""->"kiro" migration was considered and rejected, because it keeps almost every install off KAS.
@zejiangg also accepted that KAS runs unconfined on native Windows; docs/guides/windows-install.md and the Breaking lines state both effects.
Re-picking Kiro CLI (stored "kiro") restores the sandboxed Windows path.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

/ai-review override fable b23d5a9: posted at @zejiangg's direction; moving stored "" installs (including past Kiro CLI picks) to KAS, unconfined on Windows, is @zejiangg's accepted decision, documented in docs/guides/windows-install.md and the PR's Breaking lines.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@iamwhatever marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for b23d5a9c2ab3476ee9c06654c59708e6e8899a5a.

agent: posted at @zejiangg's direction; making KAS the default harness (absent or "" stored value) is a decision by the org leaders, so no RFC is required.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@iamwhatever marked the fable AI finding as false positive, not applicable, or explicitly accepted for b23d5a9c2ab3476ee9c06654c59708e6e8899a5a.

posted at @zejiangg's direction; moving stored "" installs (including past Kiro CLI picks) to KAS, unconfined on Windows, is @zejiangg's accepted decision, documented in docs/guides/windows-install.md and the PR's Breaking lines.

This decision applies only to this commit. A new push requires a new judgment.

@jongaffen jongaffen mentioned this pull request Nov 7, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make KAS the default agent harness

2 participants