Repository navigation
feat: add Kiro Cloud Sessions as a session environment - #25347
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the cloud path is a per-runtime harness subclass behind the developer flag and a policy opt-in, and other hosts are untouched. Notes
[DESIGN-REVIEWED] f058a27 Description read[DESCRIPTION-READ] 0080d7cb1f58bd924e49c3049feb48b2f2b4b1081f4b1c5677c6d01e677c3842 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) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: the whole feature sits behind Notes
What this change shipsInventory (10 items) — 8 justifiedIntent: let a chat run entirely in a Kiro Cloud Sessions sandbox, picked from the Session Environments chip — ADDITION (behind the developer flag)
[FIRST-PRINCIPLES-REVIEWED] f058a27 Description read[DESCRIPTION-READ] 75a32aea3498d774f674c3ca6dbe9f27ba8b14a8ff065eb0128cd83f6799b991 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the chat-side surfaces this PR adds. Both screenshots show only the Settings card. No screenshot shows the environment picker row, the locked cloud chip, the Files view notices, the replayed/replaced transcript cards or the incognito refusal. Evidence gaps
Notes
[UX-REVIEWED] f058a27 Description read[DESCRIPTION-READ] 05a4246ae6b2bebc8a70994ca4dd8131366a8ca157b86a108c7cb34aa4855f31 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 |
4596e8f to
4e2c13f
Compare
df8c46c to
77f1592
Compare
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 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: |
Opus 5.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: |
4e2c13f to
e0e28ad
Compare
|
Re GPT 6.1 Review BLOCKING at |
77f1592 to
989a798
Compare
3e4befd to
1cb9be4
Compare
2012f94 to
53a8492
Compare
|
HOLD (policy_sensitive) at 217633b. This head restacks the PR onto main. Kiro Cloud Sessions now joins the shared provider registry, with no duplicate resolvers. All 99 check runs are success or skipped, and PR Readiness is green. GPT 6.1 and Opus 5.5 report no findings, and the earlier GPT and Opus blocks have fixes and replies. The feature stays behind This PR stays reserved for a human reviewer. It adds a governance capability, Still open from my r142 review:
— crew-pr-reviewer (r144) |
217633b to
e83a76b
Compare
e83a76b to
fdc7863
Compare
|
Opus 5.5 BLOCKING (src/kiro_crew/coder/session_browse.py:115, deleted cloud profile falls back to Coder): fixed in fdb45e7.
|
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed head fdb45e7. CI is green (102 checks ok, none red or pending), the branch is mergeable, and the Design, First Principles, UX, Opus and GPT lanes all pass on this head.
Requested change
1. New regex for repository validation (config/session_environments.py)
The PR adds _REPOSITORY_RE and uses fullmatch to decide which repositories entries are accepted and later sent to Kiro Agent as the cloud checkout list. This project no longer takes new regex-based validation or parsing. Please replace it with a structured check, for example:
- split the stripped value once on
/into at most two parts (nameorowner/name); - check each part's length bounds explicitly (1 to 100);
- check characters with a fixed set (
set(part) <= _REPO_CHARS) and require the first character of the owner part to be alphanumeric; - reject
.and..as a part, which the current pattern allows.
A small typed helper (for example parse_repository(value) -> tuple[str | None, str]) keeps the same error message and gives the tests something exact to assert on. Existing regex in this file is out of scope.
Design brief (needs a maintainer sign-off before merge)
- What it does: adds Kiro Cloud Sessions as a session environment. A chat bound to a cloud profile runs its agent and tools in a Kiro cloud sandbox through Kiro Agent, with a new opt-in governance capability
capabilities.kiro_cloud_sessions, a Settings card, chip rows, Files panel notices and transcript error rows. It sits behind the developer flag. - Pros: purely additive; other providers do not reach the cloud harness; private chats are refused; a governed host refuses the start unless the policy itself opts in, a profile can only withdraw it, and unreadable policy or profiles fail closed with an audit row.
- Cons: tools in a cloud session never pass this host's PreToolUse gate, denied-command floor, steering or MCP servers. On a host with no governance policy that is allowed by default once a profile is chosen. A re-start that gets a new sandbox leaves the old sandbox behind and the user is not told (the Design lane note). The UX lane could not see the chip, Files panel and error row states.
- Long-term tech debt: some. A second execution model that bypasses the local gate has to be kept in mind by every future gate change, and sandbox cleanup is left to the cloud side.
What I read
Every hunk of the cloud harness (acp/harness/kas_cloud.py), the config validation and section changes, the governance baseline, catalog and spec text, the launch seam (coder/session_launch.py, including kiro_cloud_governance_refusal and the cloud session record), and the startup notice surfacing. Not yet read line by line: providers/acp_runtime_start.py, providers/acp_turns.py, the acp/runtime_* changes, the dashboard handlers and the website components. I will finish those on the next head.
|
@bolichen97 Review 5765854196, requested change 1: |
bolichen97
left a comment
There was a problem hiding this comment.
Maintainer decision (security sign-off): accepted. Cloud sessions running tools outside the PreToolUse gate on hosts with no governance policy is accepted as written, on by default. The earlier regex point is fixed, and I found no new regex in product code.
Thank you for the quick fix at 9d74386: the lock file in swap_cloud_session now opens with owner_only_opener_for, which is what the owner-only creation check failed on at the previous head. CI on this head is still running (E2E and the render benchmark among others), so I am not approving yet. I will approve once it is green.
bolichen97
left a comment
There was a problem hiding this comment.
Maintainer decision (security sign-off): the Kiro Cloud Sessions environment stays accepted as written, on by default. The rule is that we do not raise security strictness, so two small parts that make existing, non-cloud behavior stricter need to come out before I approve.
I read the whole diff at 9d74386. The lock-file fix is in, I found no new regex in product code, and the cloud-only gates (governance, private chats, and the Files and terminal refusals) only cover the new environment, so they stay. Please change these:
change_card_catalog_kinds.py:session_environments.default_profilemoves from_CANNOT_WIDEN_SETTINGSto_CODE_EXEC_SETTINGS. That raises the class of an existing setting for every host, including Coder, Sprites and boxd defaults. Please keepdefault_profilewhere it was on main. Adding the newkiro_cloud_profileskey to_CODE_EXEC_SETTINGSis fine.dashboard/handlers/session_environments.py,_fixed_by_provider:except SessionEnvironmentUnavailable: return Truelocks the environment choice of every chat, local ones included, when the choices file cannot be read. The route above it notes that an unreadable file must not lock a local chat. Please fall back to main's behavior there and lock only on positive cloud evidence.
One small fix, not blocking: in providers/acp_runtime_start.py, the cleanup call await runtime.terminate_session(handle.session_id, delete_cloud_session=True) inside except BaseException: is not shielded. A second cancel can interrupt it and leave a cloud sandbox with no recorded id. Wrapping it in asyncio.shield(...) matches the teardown in create_session.
Sensitive Change Review is red at this head, and Windows shard 2 and Coverage Combine are still running. Once these two parts are back to main's behavior and CI is green, I will approve. Thank you.
|
@bolichen97 Review 5777794841: all three are in commit 88198b5 (head e33f408): |
bolichen97
left a comment
There was a problem hiding this comment.
Maintainer decision (security sign-off): accepted, as before. Thank you: at e33f408 all three points from my last review are fixed. default_profile keeps main's class (and a test now pins it), _fixed_by_provider locks only on positive cloud evidence, and the cloud cleanup is shielded. The delta adds no regex.
One thing still blocks the approval: Backend Tests (3.12, 7) failed twice on this head, both times after about 19 minutes in "Run tests (shard 7/8)" with no failed test in the log, which looks like a hang or a timeout rather than an assertion. The other shards, the AI lanes and E2E pass. Could you check whether one of the new cloud tests can block in that shard? Once shard 7 is green I will approve.
|
The Slack code-channel test failures on Windows shard 7 came from a regression on main, which is now fixed there. Could you update this branch onto main? That clears those failures, and it also re-runs Linux shard 7, the hang I asked about in my last review. Once both shards are green I will approve. Thank you. |
A Kiro Cloud profile asks KAS to place the session in a Kiro cloud sandbox with the _meta.kiro keys kiro-cli's --cloud flag sends, and refuses to start rather than run locally when KAS does not offer cloud sandboxes.
…ends replace a session A Kiro Cloud Sessions chat sends no MCP servers, so a local MCP edit has nothing to re-send to it. Marking it anyway made its next turn evict and re-load it outside the cloud start's resume hold, and the approvals Kiro Agent replays on that load were rejected as unroutable instead of reaching the user's approval card. The mark and the apply are now no-ops on a cloud-sandbox runtime; the writer still skips the reset for it. Edit & Resend, a reset and compaction drop a session's resume id, so the next start reaches session/new and Kiro's cloud opens a new sandbox without the earlier one's files, with nothing said. record_cloud_session now returns the id the choice row held before (read under the write's lock); a start that replaced it leaves a cloud_session_replaced notice: the chat runs on a new sandbox, and the earlier one was not deleted and is still listed in Kiro Web. The failed-reopen notice (also taken when a load replays no turn, require_replay) now says the earlier session was not deleted too. A running cloud chat is also judged by the governance ceiling on every turn, not only at its start: a policy refresh or profile edit can withdraw capabilities.kiro_cloud_sessions or govern a new scope while it runs, and its tools run outside every gate Kiro Crew enforces. The start records its (session_key, agent, app); each send re-runs kiro_cloud_governance_refusal for a cloud runtime and, on a refusal, stops the runtime (never deleting the sandbox) and refuses the turn with a fixed remedy. Other sessions skip it. The Session Environments card is now a lazy chunk in Settings: it mounts only behind its preview, and the Kiro Cloud Sessions tab had pushed SettingsPage past its 500 KB budget. Everything a person reads names the feature Kiro Cloud Sessions, Kiro Agent's own name for it, untranslated and plural in every catalog: the Settings profile list and its buttons, the sandbox notices, the Files view, refusals, the config label and the docs. A catalog test fails on a shortened "Kiro Cloud". Code identifiers, config keys and stored values are unchanged.
|
@bolichen97 Rebased onto main (includes #30127, the Slack code-channel fix that was red here); no code change since your last review, now at f058a27. |
bolichen97
left a comment
There was a problem hiding this comment.
Maintainer decision (security sign-off): accepted. The Kiro Cloud Sessions environment, with cloud sessions running tools outside the PreToolUse gate on hosts with no governance policy, on by default, is approved under the rule that we do not raise security strictness.
Reviewed at f058a27. Every added and removed line is the same as the head I read in full (e33f408); only the base moved with the update onto main. At this head all 99 checks pass, with none red or pending, including both shard 7 runs. The two stricter parts are back to main's behavior, the cloud cleanup is shielded, there is no new regex in product code, and no other change request is open. This approval replaces my earlier change request. Thank you for working through every round on this one.
Problem / Motivation
Goal: Let a chat run entirely in a Kiro Cloud Sessions sandbox, chosen from the same Session Environments chip as a Coder workspace, without Kiro Crew building, reaching into or deleting that sandbox.
Kiro Agent's feature. Kiro Cloud Sessions is a feature of Kiro Agent, and this PR reaches it only through Kiro Agent over ACP: the
_meta.kirokeys kiro-cli's--cloudsends onsession/newandsession/load, Kiro Agent's own Kiro sign-in, and Kiro Agent's_kiro/session/delete. Kiro Crew calls no cloud API of its own.Today a Session Environments profile can only place a chat's tools in a Coder workspace the user runs themselves. A user with Kiro Cloud Sessions cannot start a Kiro Crew chat there: kiro-cli has a
--cloudflag, but Kiro Crew's Kiro Agent sessions always run on the gateway.Why it matters
Kiro Cloud Sessions gives a sandbox with no infrastructure to run, and keeps the agent working while the user's machine is off. Offering it as one more profile lets a Kiro Crew chat use it with the same picker, defaults and governance as any other environment.
Not a goal
Developer flag, off by default. Kiro Cloud Sessions, like every Session Environments provider, is reachable only with the developer flag
KIROCREW_DEV_MODEset; it is off by default. With it off no Kiro Cloud Sessions profile is offered, a recorded cloud choice resolves to a local session, and a start never reaches the cloud path (test/test_kiro_cloud_session.py::test_a_cloud_choice_is_unreachable_with_the_developer_flag_off). No live run against a real Kiro Cloud Sessions account has been done yet; every test here runs against a local Kiro Agent stub.What changed (motivation → approach → change)
Moved out of #21256. This is the Kiro Cloud Sessions half of #21256, split out so each PR reviews and lands on its own. #21260 built it and it rode on #21256 as that PR's second commit. This PR's tree is exactly that content rebased onto main, plus fix A below; #21256 is now credentialed git only. Its review history stays on #21256 and #21260.
Named Kiro Cloud Sessions everywhere a person reads it. The feature carries Kiro Agent's own name, plural and untranslated in all 12 languages: the Settings profile list and its Add and Remove buttons, the sandbox notices, the Files view, the incognito, governance and entitlement refusals, the config label (
Kiro Cloud Sessions Profiles), the docs and the feature-map rows. Code identifiers, config keys (kiro_cloud_profiles), thekiro_cloudprovider id, the notice kinds and stored values are unchanged.On main. #21256 has merged, so this PR targets main and carries only its own two commits: the Kiro Cloud Sessions commit and the fix commit below.
Joins the provider registry Sprites and boxd added (#21257). Main now lists every provider once in
config/session_environments.PROVIDERS, and Kiro Cloud Sessions is a row there (kiro_cloud,kiro_cloud_profiles, "Kiro Cloud Sessions"), but not inVM_PROVIDERS: Kiro Crew owns no VM and keeps no registry for it. So the cross-provider id rule,routing.profile_provider/chosen_provider, the choice row'sCHOICE_PROVIDERSand the config writer's id-collision check cover it with no code of its own. Its list validates and loads through main's_validate_list/_load_list; a whole-section save keeps an omitted list through the same_keep_saved_profilesvalidator as Sprites and boxd; the explicit default leaf and a whole-section save go through main's write-time default check.prepare_for_sessionchecks for Kiro Cloud Sessions beforeprepare_vm_session, and browse refuses it before the VM branch. The duplicate resolvers this PR carried incoder/session_launch.pyare gone; it imports main's. In Settings, Kiro Cloud Sessions is the fourth provider choice beside Coder, Fly.io Sprites and boxd, inside main's numbered steps.A Session Environments profile can say "run this whole chat in Kiro's cloud". Kiro Crew does not build a sandbox. It asks Kiro Agent for one with the same
_meta.kirokeys kiro-cli's--cloudflag sends, confirmed against the installed kiro-cli 2.21.1's ACP client (newSession/loadSession). It refuses to start, rather than run locally, when Kiro Agent does not offer acloud-sandboxtarget.src/kiro_crew/config,config-baseline.json,src/kiro_crew/dashboard(handlers/core.py)session_environments.kiro_cloud_profiles: at most 20{id, name, repositories}records, each with at most 10owner/namerepositories. A save that gives one id to both a Coder and a Kiro Cloud Sessions profile is refused with 400profile_id_collision, writing nothingsrc/kiro_crew/platform(governance_parts/catalog.py),src/kiro_crew/coder(session_launch.py),src/kiro_crew/session_allocation_parts(get_or_create.py)capabilities.kiro_cloud_sessions, opt-in. When the policy or the session's profile sets ANY other scope, a cloud start needs that row enabled in the POLICY; a profile can withdraw it, never grant it. The profile is the one the session's tool calls get: app-bound first (the chat slot's own app, which session allocation sets on the provider asowning_app; never transcript metadata), then agent, then surface. An unreadable ceiling refuses. Every decision writes a SEL governance eventsrc/kiro_crew/coder(session_launch.py,session_browse.py)prepare_for_sessionreturnsPreparedCloudSession; the cloud id is recorded only if the same provider and profile are still chosen, else the start fails and the runtime is killed. Browse raisesCloudSandboxOnlybefore any Coder callsrc/kiro_crew/acp(harness/kas_cloud.py,harness/base.py,runtime.py,session_handle.py,session_handle_turn.py,session_handle_lifecycle.py,session_handle_runtime_contract.py,session_provider.py),src/kiro_crew/providers(acp_runtime_start.py,acp.py,base.py),src/kiro_crew/session_lifecycle_parts(fleet.py)KasCloudSandboxHarnesssendsexecutionTarget: cloud-sandboxplus the repositories (orisEmptyWorkspace), no MCP servers and no custom agent; every other host's request is unchanged (session_requestseam, harness-parity H13). Replayed approvals are held by a resume hold only the provider's cloud start takes (hold_cloud_resume; the runtime'sload_sessionis unchanged), plus two reader seams (holds_replayed_permission,unroutable_permission) every other host answers as a no-op, so the runtime's shared start and resume paths never test for the cloud harness. The cloud-only branches are the cloud harness itself, the provider's cloud start, and the handle's drain and teardown, which readis_cloud_sandbox. The keep-running rules belowsrc/kiro_crew/dashboard(chat_runner.py,chat_turn/turn_spec_hooks.py,handlers/session_environments.py),src/kiro_crew/context_assembly(turn.py)meta.kind = cloud_session_replayed); the environment endpoint returns the recorded provider; browse and file routes answer 409cloud_sandbox; the[PROJECT]line names the sandboxwebsite/src/pages,website/src/components,website/src/api,website/src/app-sdk,website/src/i18ncloud_sandboxis a rejected request and renders as anErrorNoticewith Ask the agent (no tree, Refresh or terminal), like any other listing failure; the error card renderscloud_session_replayedandcloud_session_replacedin the reader's language. Strings in all 12 catalogssrc/kiro_crew/change_card_catalog_kinds.py,docskiro_cloud_profilesanddefault_profileare code-exec. Specs:providers.md,acp-client.md,session.md,config.md,governance.md,docs/feature-map/README.mdGovernance is re-checked on every turn. The start's governance check is not enough on its own: a policy refresh or a profile edit can withdraw
capabilities.kiro_cloud_sessions, or govern a new scope, while a cloud chat runs. Soacp_turns._ready_confirmed_session, the gate every prompt, command and compaction send goes through, re-runskiro_cloud_governance_refusalwith the start's own(session_key, agent, app)for a cloud runtime. On a refusal it stops the cloud runtime (the sandbox is never deleted) and refuses the turn with words a retry can't change; the next start meets the same refusal. Other sessions skip it.Incognito and temporary chats can't use Kiro Cloud Sessions. Such a chat never reopens its session (resume is for persistent chats only), so after an idle eviction or restart a cloud start would mint a new sandbox and silently strand the earlier one's files. It is refused before any sandbox exists, at three points: the start (
_start_kiro_runtime_implrefuses aPreparedCloudSessionfor a non-persistent chat), the chat's environment choice (PUT …/environmentanswers 400choice_refused,reason: private_chat, shown as "Kiro Cloud Sessions aren't available in incognito or temporary chats."), and a Kiro Cloud Sessions default (apply_default_environmentleaves the chat on this machine). Coder and other remotes stay choosable. Pinned bytest_a_private_chat_never_starts_a_cloud_sandbox,test_a_private_chat_cannot_choose_a_cloud_profileandtest_a_private_chat_skips_a_kiro_cloud_default, each failing when its site is reverted, and a chip test for the message.Cloud session lifecycle
The cloud agent keeps running when Kiro Crew lets go of it, so Kiro Crew never cancels or deletes it on its own:
turn_survives_disconnectis true. A user's Stop still cancelssession/loadwith the recorded id andsessionSource: remote; no second sandboxsession/newno handle was returned forsession/newanswered, a latesession/newanswer nobody adopts, and the entitlement probe's own session. Asession/loadnever counts, so a failed reopen keeps its session_kiro/session/deletecannot be undone, so removing a Kiro Crew row is not taken as consent to destroy it. Sessions Kiro Crew no longer points at are listed and deleted in Kiro Web (app.kiro.dev) or the IDE's cloud-session menu (Delete Session), per Kiro's docsrequire_replayfor Kiro Agent, unchanged). The transcript error says: "Couldn't reopen the cloud session, so a new cloud session started with this conversation carried over. Files and changes from the earlier session aren't in it. The earlier session wasn't deleted and is still listed in Kiro Web (app.kiro.dev)."record_cloud_sessionreturns the earlier id, read under the write's lock) and, when they differ, leaves an error row (meta.kind = cloud_session_replaced): "This chat now runs on a new Kiro Cloud Sessions sandbox. Files and changes from the earlier sandbox aren't in it. The earlier sandbox wasn't deleted and is still listed in Kiro Web (app.kiro.dev)." A reopen of the same id or a first start leaves noneA chat's environment locks only once Kiro's cloud holds the session; a start refused before then leaves the chat free to move back to this machine. Riders:
default_profilemoves from cannot-widen to code-exec, because a default can now bind every new chat to a sandbox outside the tool gate;Kiro Cloud Sessionsjoins the i18n glossary.Known limit: no cleanup deletes a sandbox. Kiro Crew never deletes a cloud session from a chat's teardown, archive or delete, because a provider shutdown also runs on idle eviction, compaction, resets and gateway restarts. The only sessions it deletes are ones no handle was ever returned for (see the table). Sessions Kiro Crew no longer points at stay in Kiro's cloud until the user deletes them in Kiro Web or the IDE.
Terminal reconnect fix (fix A). Opening a terminal on a Kiro Cloud Sessions chat raised
CloudSandboxOnly, a subclass ofSessionEnvironmentUnavailable, soterminal_placement._remote_terminal_argvansweredterminal_placement_unavailableand the tab showed "reconnecting" and redialled about 10 times before giving up. It now catchesCloudSandboxOnlyfirst and answersterminal_wrong_machine, so the tab parks at once, as for any chat whose shell runs elsewhere. Pinned by the cloud case intest_session_environment_handlers.py::test_terminal_remote_slot_never_falls_back_to_a_local_shell, which fails with the arm removed.Earlier review rounds, carried here:
change_card_catalog.py, so the two settings-list edits sit inchange_card_catalog_kinds.py; B's new class test now expectssession_environments.default_profileunder_CODE_EXEC_SETTINGS, where the Kiro Cloud Sessions commit puts it; main renamed the Kiro Agent backend's label to "Kiro Agent", so the glossary dropskiro-agentand the setup-step test reads the new label.acp/runtime.pyinto itsruntime_*owners): the cloud hooks moved to their owners (set_cloud_sandbox/hold_cloud_resumeinruntime_remote_workspace.py,is_cloud_sandboxand_unclaimed_new_sessionson the class, the request shaping inruntime_session_create.py/runtime_session_load.py, teardown inruntime_session_registry.py, the replay hold inruntime_reader_loop.py/runtime_host_requests.py), with the binding ratchet updated. Thecore.pyandchat_runner.pysplits likewise: the editable-config entry is incore_config_schema.py, the id-collision check incore_config_patch.py, the startup notice inchat_turn/turn_admission.py.beforesets, refusing an unreadable row) now also records and checks the provider: an unknown provider is refused, not read as local.session_environments.kiro_cloud_profileskeeps the leaf path feat: run a chat in a Kiro Cloud Sessions sandbox #21260 gave it.session/newanswered but before its handle is returned (the chat closed mid-setup, or a setup step with no refusal arm of its own failing) tears the minted session down, so a cloud sandbox is deleted rather than left untracked.create_sessionguards the whole post-session/newsetup; the guard skips an id an inner arm already freed, and is shielded against a second cancel.cloud_sandboxfor a cloud chat, as the browse routes do (it used to open a card that retried a 502).session_environmentssave keeps every optional key it omits through that key's own loader validator (a hand-edited value the loader refuses is not carried, and a key with no validator is never carried; a test pins one validator per key). Profile lists merge before the default, so a default naming a kept Kiro Cloud Sessions profile survives a save from a tab that predates Kiro Cloud Sessions. Revert-fail:TestStaleCardSavefails against the previous merge rule.Backwards compatibility
Compatible:
kiro_cloud_profilesis a new optional key, empty by default, so every existing profile, chat and save behaves as before. Every new runtime branch (no drain cancel, held approvals, local-only teardown, the startup notice) is keyed on the cloud harness, so other hosts keep their wire and teardown. One change-card classification moves: editingsession_environments.default_profileshows the code-exec card; the values it accepts are unchanged.One write rule differs from Sprites and boxd, as this PR already had it: a
kiro_cloud_profilesleaf write that removes the default's profile is accepted and drops the default (_drop_dangling_default_profile), where asprites_profilesorboxd_profilesleaf write that would is refused. The rule is unchanged for each list.Readers that now meet a
kiro_cloudchoice row, unchanged by this PR, each staying closed:session_environment.session_runs_remotelyanswers True, so local-only tools stay refused for a cloud chat, as for a Coder one.coder/retention.py:warn_unsaved_workaskssession_browse.unsaved_work, whose_resolveraisesCloudSandboxOnly; the check logs it and the archive goes on with no notice.providers/acp_lifecycle.py:_bound_remotelyanswers True, so a non-runtime backend refuses withREMOTE_NEEDS_KASinstead of starting locally.setting.changecard forsession_environments.default_profilenow asks for code-exec approval.Removes nothing: no key, route, tool or setting goes away, and the
session_requestseam returns its inputs unchanged for every existing host, and the two reader seams do nothing on them.Tests
website/src/i18n/kiroCloudSessionsName.test.ts(new): every catalog names the feature exactly "Kiro Cloud Sessions" (a shortened "Kiro Cloud", a singular or a hyphenated compound fails), and the Settings heading and profile buttons keep the full name; it fails with the old "Add Kiro Cloud profile" restored.SessionEnvironmentsCard.test.tsxalso asserts the rendered tab shows no shortened name.test/test_kiro_cloud_session.py(new, 104 tests against a Kiro Agent stub): thesession/new/session/loadshapes, the empty workspace, and the refusal when Kiro Agent offers nocloud-sandbox. Governance: a ceiling on any scope refuses until the policy opts in; a profile cannot grant; an unreadable ceiling refuses; every decision is audited. Lock: a refused start can move back; a cleared, Coder or other-cloud choice during the reply fails the start and kills the runtime. Keep-running: the drain andclose_allsend no cancel or delete for a cloud turn while an ordinary Kiro Agent turn still cancels; the next start reloads the same id; a replayed approval reaches the normal approval event, also with a stranded request queued behind it, and an unregistered one expires; every served host answers the reader seams as a no-op, the shareddestroyand turn drain carry nogetattrprobe foris_cloud_sandbox, the runtime'sload_sessiontakes no hold, and the provider's cloud start does; no chat teardown deletes, in any memory mode; a refused cloud start, an unadopted latesession/newand the entitlement probe delete the session they minted; a failed reload after a successful load deletes nothing; the fallback notice is logged and surfaces once, including through a real dashboard turn (test/turn_harness.py'srun_turn; removing the call in_run_chatfails it).test/test_session_environments_config.py,test/test_change_card_setting_classes.py,test/test_session_environments_start_gate.py: round-trip and collision refusal,default_profileis code-exec, a cloud-only config counts as configured.test/test_acp_bindings.py,test/test_acp_harness_contract.py,test/test_acp_runtime_load_session.py,test/test_harness_parity.pyfollow the new property and the moved_load_sessionbody.website/src/test/SessionEnvironmentsCard.test.tsx(the cloud section sits outside Coder's steps, with its own labels and plain-view cost),website/src/test/RemoteFilesPanel.test.tsx(a recorded cloud placement renders an info notice with no browse call; a 409cloud_sandboxbrowse is an alert with Ask the agent and no Refresh, tree or terminal, and a real listing failure stays an alert with Ask the agent),website/src/test/SessionEnvironmentChip.test.tsx,website/src/test/ErrorCard.test.tsx(the replay error is localized),website/src/test/settingsCoverage.test.ts.test/test_session_environment_handlers.py: a Kiro Cloud Sessions chat's terminal getsterminal_wrong_machine(fix A).test/test_kiro_cloud_sandbox_notice.py(new): Edit & Resend, a reset and compaction, each throughSessionManager's own call (discard_conversation,discard_conversation(replay=False),reset(clear_conversation=True)), clear the resume id, and the next start reportscloud_session_replacedand deletes nothing; a reopen of the recorded id and a first start report nothing; a load that replays no turn falls back with the failed-reopen notice. Each fails with the notice code reverted. The Kiro Agent stub now replays one turn on a load (as Kiro Agent does), unless told not to.test/test_kiro_cloud_turn_governance.py(new): governance is re-checked on every turn of a running cloud chat, not only at its start. A narrowed ceiling refuses the next turn (fixed-remedyAcpError, nosession/prompt, no_kiro/session/delete, runtime stopped); a chat the ceiling still allows keeps working and is re-checked once per turn with its start's own(session_key, agent, app); local and remote-workspace runtimes are never checked. The first two fail with the admission call removed, the last with its cloud-runtime guard removed.React.lazyinSettingsPage.tsx, behind aSuspenseskeleton), since it mounts only behind its preview. Built locally withvite build --mode analyze:SettingsPageis 480,683 B (under the 500 KB default) and the card is its own 37,342 B chunk; the bundle-size gate passes with noCHUNK_BUDGETSchange.SettingsPage.test.tsxwaits for the lazy card.test_mate_conductor_agent.pyandtest_agent_refactor_spec_bytes.py(12 tests) failed on main too and are fixed by test(crew): read the crewmate conductor as ledger-mounted #28301, now merged; this head includes it.test/test_kas_mcp_live_reinject.py: a cloud session ignores the MCP re-injection mark and never reloads, while the writer still skips the reset for it.53a84922a7(the head after it,bdb4eebcd7, only reshapes onereturnso mypy can narrow it; mypy 1.14.1 at CI's pin flagged the old line and passes the new one) (scoped, low worker count): 24 backend files withpytest -n 4(1,560 passed; the one local failure,test_runtime_bindings.py::test_the_constructor_keeps_its_type_hints, is a Python 3.13pathlib._local.Pathrepr that CI's 3.12 does not produce), then the four real failures it found (three test-only, one test pin on the provider list) fixed and re-run green;tsc(run before a last two-line card change that eslint then covered); vitest on the Session Environments card, chip, ErrorCard, RemoteFilesPanel, settings coverage andsrc/i18n/(2 workers; its two failures, a Hindi register rule and a test's section name, fixed and re-run green);i18n:check;gen:settings,gen:ui,i18n:pseudoand the config baseline (no drift); black, flake8, isort, eslint, the line-cap check. Revert check: with thecloud_session_replacedbranch disabled, the four replacement tests intest_kiro_cloud_sandbox_notice.pyfail.Manual verification
Not verified against a real cloud account. Whether a cloud turn actually keeps running after the local Kiro Agent relay stops has not been tested against a real Kiro Cloud Sessions account. Every test here ran against local Kiro Agent stubs; the keep-running behaviour above is what Kiro Crew sends and stops sending, and the claim that the cloud keeps the turn comes from Kiro's docs.
Kiro Agent limits, as found:
us-east-1onlycloud-sandbox, including a gateway restart mid-turn, a reopen with a pending approval and asession/loadresume.Screenshots / video
After the rename, on this head. The Kiro Cloud Sessions provider tab, opened on a setup with only Kiro Cloud Sessions profiles saved: setup steps (step 1 names the Kiro Agent backend), the plain-view warning, the Kiro Cloud Sessions profiles list with a profile expanded, its Remove Kiro Cloud Sessions profile and Add Kiro Cloud Sessions profile buttons, step 2 saying these profiles aren't checked ahead of time, and step 3 saying each chat's Kiro Cloud Sessions sandbox is listed in Kiro Web. The capture script fails if any shortened "Kiro Cloud" is on the page.
Light theme
Earlier captures (the fixed chip, the Files panel and the transcript notices) were taken before the rename and showed the old name, so they are removed. Their behaviour is unchanged, and their wording is asserted in
RemoteFilesPanel.test.tsx,ErrorCard.test.tsxandSessionEnvironmentChip.test.tsx.Related Issues
Part of #10433
no linked issue: this PR closes nothing; #10433 stays open until the whole Session Environments stack lands.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license (see the Licensing section of CONTRIBUTING.md).