Repository navigation
Conversation
… injection is its only change (#37954) A tool that rewrites every spec in the agents directory on each launch adds its own server entry to kirocrew-dashboard-author.json too. The file then no longer reproduces the installer-recorded ownership digest, so every rebuild treated it as a user file and left it alone. After an upgrade it kept launching kirocrew-core from the removed install, and doctor reported dead paths the rebuild did not clear. The ownership digest is now taken over the spec with every edition-registered injection removed (agent_spec_injections, the seam the knowledge spec repair uses). The installer, the dashboard save, the model reset, the skill-URI migration and the legacy-hook sweep all record it that way, so an injected identifier that changes per launch never enters the record. Any other change still fails to reproduce the digest and is left alone. The public core registers no filter. Fixes #37943 (cherry picked from commit 38f4a31)
…rs (#38078) With MCP sharing on, the user's own servers reach the session as gateway stubs, so a start a person waits on held for them up to five seconds like a Connection bridge. Leave them to the first turn, as the user's unshared servers already are; the [MCP SERVERS] block names the ones still starting, and a turn with no block holds for them as before. (cherry picked from commit c87ea0c)
…round turn (#38221) kirocrew-lite mounts nothing. A server in its block was written into the spec by another tool, and background_turn closes such a session right after the start, so the start's brief wait for that server only delayed the refusal by up to MOUNTED_MCP_WAIT_SECS (5 s). Every other agent keeps the brief wait, and the post-start check is unchanged. Part of #37513 (cherry picked from commit 1271ebd)
…s helper (#38339) A codex spawn whose agent spec mounts nothing (client_mcp_array.spec_is_toolless, judged on the mirrored session spec the MCP array is built from) now gets the same CODEX_CONFIG override kirocrew-lite already had: every server in the user config.toml, and now also in the project .codex/config.toml layers from the git root down to the work dir, is passed as enabled = false. codex keys agent and spec_generation per process, so normal chats keep the user's servers. The harness probe gains a tool-less run (PROBE_TOOLLESS) and a codex expectation toolless_ambient = []; with the fix reverted it measures codex-project and codex-user starting. Closes #30601 Original author: Joe Guo. Conflict resolved on release/0.13.0. (cherry picked from commit b121bc3)
…s unconfirmed (#38919) A worker whose zero-tool confirmation fails even after the pre-spawn repair now raises KnowledgeSpecUnconfirmed, naming the file kiro-cli loaded (the published skill-view alias, or the authored spec when no view was prepared) and the top-level keys that mount something. When the view mounts nothing but its alias does, the message says the alias was rewritten after publication, instead of suggesting a project-level spec. send_batch and the extractor treat it like the harness refusal: the ingest fails once instead of every chunk respawning, repairing and being refused. The pool refuses further starts for 600 s without spawning. The zero-tool check itself is unchanged. Closes #38915 Part of #37513 Original author: Joe Guo (iamwhatever); co-authors as on the main commit. (cherry picked from commit 421f3c8)
…istered injection (#38822) A tool that writes its own MCP server into every spec in the agents directory on each launch made every kirocrew-lite background turn on KAS refuse, so history consolidation never ran on such a host. The knowledge worker already handles this through the edition-registered filters in kiro_crew.agent_spec_injections (#30249): a file whose only change is an injection a filter removes exactly is left alone, and the worker runs from Crew's own template. kirocrew-lite now uses the same seam on KAS, where Crew sends the spec itself: the KAS projection sends the template, the pre-spawn verdict (taken for the backend the background session starts on) and the post-start check judge that same spec, and every broker stub the spec does not mount is withdrawn, against the stub names captured for that session's session/new. Anything a filter does not remove exactly is still refused. kiro-cli loads the file on disk, so there the injection is refused as before, and a pre-spawn read taken for KAS does not vouch for a kiro-cli start. With nothing registered (the public core) nothing changes. Part of #37513 (cherry picked from commit 28530a4)
…ses (#37776) A dashboard PR loop settled on the merge with only the user's bell, so the agent waiting on it was never woken; every gated loop with a pull-request reading now gets one final turn opening with the result. monitor_update on such an ended loop is refused in the same call instead of acknowledged. Co-authored-by: Joe Guo <zejiangg@amazon.com> (cherry picked from commit 944c87d)
…cmd/PowerShell in-word escapes (#33569) The deny views now also try the program word without a trailing .exe/.cmd/.bat, and the command with a caret or backtick between two letters or digits removed. Both are extra views; the raw and POSIX-normalized views are unchanged, so nothing that was denied becomes allowed. Co-authored-by: Zejiang Guo <zejiangg@amazon.com> (cherry picked from commit 5abc52b)
…odel unsigned (#37629) MiMo Code 0.1.17 is built on opencode and has the gap #37480 closed there. With no sign-in, no key and no model in its config, session/new puts the session on xiaomi/mimo-v2.6-pro-ultraspeed and the first prompt goes to Xiaomi's API with no Authorization header. Crew did not stop it: the start-time refusal ran for opencode only. Following #37602's split, a new MimocodeAcpClient (acp/client_mimocode.py, bound from client_mimocode_session) fills the _refuse_harness_default_model hook; AcpClient(acp_backend="mimocode") now builds it. It refuses when the session's model and every advertised model are xiaomi/ ones, the harness config names no model, and no Xiaomi credential is present. A signed-in host advertises the very same models, so MiMo Code's read-back records that last fact: the sign-in file the auth declaration names (under XDG_DATA_HOME or HOME), XIAOMI_API_KEY or MIMOCODE_AUTH_CONTENT in the child's environment, or a provider.xiaomi.options.apiKey in the resolved config. The file is checked for existence only and never opened; the key is checked for presence and never logged. A signed-in host, a model named in mimocode.json, a Crew pin, or a provider of the operator's own is left alone. Co-authored-by: Joe Guo <zejiangg@amazon.com> (cherry picked from commit c7c9357)
Co-authored-by: Joe Guo <zejiangg@amazon.com> (cherry picked from commit 9782f63)
* fix: refuse a Bot identity on a session an app owns An app's permissions.api entries approve paths, never a Bot. A session an app owns could still resolve to a Bot from the agent name on it, which attached the Bot's memory store and chat identity to that session although the owner never gave the app that Bot. Turn admission refuses a turn on an app-owned slot whose selection is a Bot's own: a config.agents record bound to a store other than the shared one, one whose chat runs on the conductor, or an execution record that carries a Bot's id. The turn ends on one error row before a store is attached, a record is written or a provider is started, and the eager start stands down on the same test. That covers a name stamped by any route and a record the session already carries. The owner's own pick of a Bot on an app's tab is still taken by the switch route and ends at the turn in the same way; the log line names the app and the agent. The four routes that take an agent name from an app (slot create, chat send, agent switch, /v1/chat/completions) answer the request itself with the 404 an app gets for anything it may not reach. A row on the shared store, the reserved default row among them, has nothing of its own and keeps working, as does a template that shares a Bot's name. The owner's sessions, and a Bot thread reached through sessionApproval with memberThreads, are not judged. Tests cover each route, a name stamped on the slot, a session that already carries a Bot record, the eager start, the owner opening a session as a Bot, an app running its own template, and a shared-store row, and the owner's pick on an app's tab. * fix: hold an app to its own cron jobs and spawned runs An app does not reach what is a Bot's own, its memory store or its chat, by naming the Bot, and an app token is not the owner. The App Kit SDKs hold both for their own creates; the HTTP entries did not. Creates. POST /api/crons, the cron_add tool behind POST /api/crons/tools and POST /api/spawn refuse a caller with an app claim that names a Bot's own, with an answer each route already gives (403 owner_only, the tool's error text, 404 unknown_member, 409 member_identity_unavailable). One test decides what is a Bot's own (execution_context.is_bot_own_execution). A caller that already runs on that Bot's store goes on as itself, and a row on the shared store is not judged. Runs. POST /api/spawn from an app token is held to what apps.spawn_sdk holds an app's run to: it names an agent, the route hands the manager the app so the gate proves the agent is the app's own, judges the spawn under the app's profile and records the run under the app, and a parent session must be the app's own. The per-run routes (status, steer, retry, release, delete, continue) and the live half of the listing reach only a run recorded under the caller's app; any other run answers 404 task_scope_denied. Fire time. A job an app created dispatches a name that is a Bot's own row as a template, so it takes none of the Bot's agent, workspace or crew identity, in a single run and in an agent_sequence step. A job that captured a Bot's execution is refused before any dispatch and does not feed the auto-pause counter. The owner's requests, an internal caller's session-owned reach and an app's own agent are unchanged. Tests cover each entry for an app token, the owner, an app's own agent and a shared-store row. (cherry picked from commit 1013d4a)
(cherry picked from commit 8082d3a)
The ssh-to-self floor allowed `echo "$(echo 'a"b')" ; ssh -p 22 <this host> id`, which bash runs. Two readers lost the quote state. The static splice put the output `a"b` into the line, where its `"` closed the outer quote. And the separator mask read the `"` inside the single quotes of the double-quoted body as the outer closer, so the later `;` was masked as quoted text. The splice now writes each quote, and a trailing backslash, of the output it puts in the line as `_`, as the outer shell never reads them there. `eval` and `sh -c` do read them again, so the line with the verbatim splice is judged as well, once and repeated until no static $( ) is left, by the outermost call and by each bound function body only, and each verdict in one call tree is judged once, so nested bodies add calls linearly, and bodies that define and call functions grow as on main. The body reader moved to shell_commands beside the span readers. The mask copies each double-quoted `$( )` body whose `)` is proven as quoted data in one step, found by the span reader that already judges those bodies. In the copy the argv walk tokenizes, the body's quotes become `_`, so two bodies cannot pair around a later ssh; the verb probe and the function-call binder read the copy that keeps them, and so does the verbatim reading's walk, as eval re-parses them. A body inside heredoc text keeps its old reading. The rewritten copies replaced the floor's earlier reading, so a line that reading refused could pass. The floor now also reads each line as before these rewrites, a mode every nested call inherits, and refuses when either reading refuses, so they can only add refusals. The new reading keeps a splice in heredoc text verbatim, so heredoc text after such a body stays allowed as on main. Fixes #37444 Co-authored-by: Zezhen Xu <zezhexu@amazon.com> (cherry picked from commit febc098)
…account (#38053) The credit pill, the model picker and the browser's last-good model list were cached by time only, so a `kiro-cli login` to another account kept the previous account's plan and models on screen. Each now checks the merged sign-in identity fingerprint (kiro-cli store, API key, Crew vault): the usage GET drops the reading and refreshes when the account provably moves, /api/models and pin saves skip sessions spawned under another account, and the browser scopes its model cache to an opaque account tag served with the usage poll. Closes #38051 Co-authored-by: Zejiang Guo <zejiangg@amazon.com> (cherry picked from commit 08e257a)
…turn (#38076) A reply in a Slack thread linked to a dashboard chat runs as that chat's turn, after the Slack handler task has deleted the message's downloaded files, so the agent and the dashboard row got a dead temp path. route_linked_thread now stores each picture in the linked session's attachments (ConversationLog.store_ingested_images) before the hand-off, and the turn and the row name the stored copy. The event path records the files after the code-channel dispatch; the queue drain records each entry's own files. Part of #10871 Co-authored-by: atkinh-amzn <356308962+atkinh-amzn@users.noreply.github.com> (cherry picked from commit 9945f61)
…er (#36669) The tool policy cache evicted the oldest inserted session, so a session still calling tools was dropped once 256 newer sessions had resolved. Its next read of a busy gateway timed out and refused every tool. A cache hit now refreshes a use stamp and eviction drops the least recently used entry. An evicted entry moves to a bounded last-good record (1024, oldest dropped first, removed when the session resolves again) that a failed read answers from. A session that never resolved has no record and still refuses. Refs #36650 Co-authored-by: kirocrew-agent <agent@kirocrew.local> (cherry picked from commit db6395c)
…g links (#36994) * test: owner-only files and overlay pruning refuse links Cover owner_only_opener, owner_only_opener_for, write_text_owner_only and append_line: a link at the final name raises ELOOP and its target is unchanged, and the helpers still open files when os.O_NOFOLLOW does not exist. Cover the stale-file removal in the overlay, crewmate and env folders: nothing is removed through a linked folder (a symlink, or a junction on Windows), on a full pass and on a cache hit, and a link made after the folder check is not followed. * fix: open owner-only files and prune overlay folders without following links Add O_NOFOLLOW to the open flags of owner_only_opener (and so owner_only_opener_for and write_text_owner_only) and append_line. A link at the final name raises ELOOP. Where os.O_NOFOLLOW does not exist (Windows) the flag is 0 and nothing changes. Remove stale overlay, crewmate and env sidecar files only after the folder passes refuse_linked_parent. The folder is then opened with O_NOFOLLOW and each file is removed with unlink(name, dir_fd=...). Where that is not available (Windows) the files are removed by path after the same check. (cherry picked from commit 37fa3e4)
* test: pin that the local token mint refuses app backends An app backend, or a descendant of one, that asks GET /api/token/local must get 403 and no token. The owner gate must refuse any non-empty app claim. * fix: refuse the local token mint to app backends A caller admitted by the app-backend leg (a gateway-spawned backend or a descendant of one) gets 403 and no token from GET /api/token/local. The audit row names the app. A backend whose registry key is empty stays on the backend leg instead of falling through to the host-process leg. (cherry picked from commit 3d120ec)
Builder-Run: build-35233-bb8ca006c198 Co-authored-by: KiroCrewAutoBuilder <353126227+KiroCrewAutoBuilder@users.noreply.github.com> (cherry picked from commit ebcc089)
) * test(restore): pin that restore never chooses a mode by itself Without --mode, `kirocrew restore` must ask on a terminal and refuse off a terminal, whether or not a live memory.db exists. These tests fail until the mode choice is removed from restore_main. * fix(restore): require an explicit mode, never default to replace Without --mode, restore chose merge when a live memory.db existed and replace otherwise, so a fresh install ran Replace with no prompt. The mode is now named with --mode or typed at a prompt on a terminal; off a terminal the command refuses before it reads the archive, with an error naming --mode merge and --mode replace. --dry-run follows the same rule. The --mode help and the CLI reference no longer describe an automatic choice. (cherry picked from commit 65adbd7)
The payload walk found each $( / <( / >( span's closing paren by re-reading the command from offset 0 just to learn the quote state at the span's open. A heredoc with one span per line therefore cost O(spans x length): about 1 s of deny-gate time at 8 KB and 13 s at 31 KB, and the per-call tool gate held a ~18 KB command for over 5 s. The redirect reader that blanks unquoted substitutions did the same for a command with a redirect cut by a substitution on every line. The walk now records the quote state at every step of the text once and starts each span's close search at its open with that state, in both readers. The steps from the open on are the ones a walk from offset 0 takes, so every span closes where it did and no verdict changes. The scanner also resumes at an offset instead of copying a slice. One walk now takes under three scanner steps per character. Pinned on work counts: scanner steps stay under ten per character of both command shapes, and a span resumed at its open closes where a walk from the start does across the quoting, comment, case, ANSI-C, escaped, backtick and process-substitution spellings. (cherry picked from commit af270ec)
…wn (#36664) A chat could refuse every send with "This session is loaded in another program, kirocrew (pid N), which owns its execution." after a background start of that chat was cancelled mid-teardown. Three teardowns inside the background-start task pop the session from the registry first and stop its process only afterwards: the two stale arms of _spawn_admitted_prefetch and the deferred project reset it applies first. A cancel landing between the two steps abandoned the teardown, so the agent process kept running and kept kiro-cli's execution lease on the chat's session while the gateway no longer knew it existed. Those three teardowns now run under asyncio.shield, as the prefetch TTL and the over-cap eviction in the same file already do, so the cancel still ends the task while the teardown completes. A cancelled deferred reset leaves its flag armed, as any failed consume does, so the next consume applies it. The two stale arms also keep the session's turn permit until remove() pops the session, which releases it in the same lock hold: a claim parked on that permit now wakes to a gone session and starts its own, instead of taking the stale one the teardown is about to kill. Part of #35669 (cherry picked from commit 3de505c)
BatchWindow.printed ran the batch write guard's pure-Python token scanner over a tool call's whole cumulative result text on every non-terminal tool_call_update, so a result streamed in N growing updates cost about N/2 full scans of up to 256 KiB on the event loop, long enough to trip the gateway's loop-stall exit. A member now remembers how far its result text was read: the length, the last 64 characters and a hash of what precedes them. A later update is read from where it stops matching that text, with a 64-character overlap and two characters of context before it, so a token split there is read whole. Times are read from that point, with a colon in front so a time at the cut's first character, whose left neighbour the cut lost, is refused; a time can be glued to a word, so it is read before the word skip. Other tokens are read from past a word cut at the overlap's front, so the tail of a run too long to be a token (a sha512, a base64 blob) is never read as a token of its own. The prefix hash decides whether the update continues what was read (a JSON-encoded result moves past its own closing brackets), so a delta or a rewritten result is read whole. The one detector that needs all of the text, the JSON "pr" field parse, now runs on the whole text on every update through json_pr_numbers, gated as tokens_of gates it, and never on the cut, so a "pr" nested in a JSON string value is still learned when the terminal update carries no output. json.loads is a C-level parse, so this does not bring back the per-character cost. The terminal update stays a whole read, and a result over 256 KiB still marks the seen set incomplete by its full length. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit f4754ac)
…ateway (#39189) On a host without cgroup v2 delegation the agent tree has no memory.max, so the kernel's host-wide OOM killer is the only memory ceiling. Session hosts were spawned with oom_score_adj 0, tying the gateway, so the kernel picked by size and killed the gateway, ending every session. The ACP launch tail now picks unbounded_session_host when cgroup_scope_argv did not wrap the spawn. It keeps session_host's NOFILE headroom and adds the OOM bias, which every process in the agent tree inherits, including shell commands the harness runs itself. Co-authored-by: Sajal Narang <sajalnarang@gmail.com> (cherry picked from commit f47c07b)
…r session switch refusals (#38982) - learn: log lesson text redacted and capped at 200 chars; withhold it if the redactor cannot run - no-tools notice: show the redacted agent name; a name the redactor changed gets no link token, so the row is drawn from its own text instead of opening another agent's page - Claude child tool title on the parent session: run it through redact_text (no cut before it) - boot-time update: redact the apply output through the platform context; withhold it if composition failed - ultracode / Fast mode refusals: a fixed sentence in the 502 body; detail stays in the log The 502 test pin in test_claude_fast_mode_toggle.py changes on purpose. Original author: Joe Guo. Conflict resolved on release/0.13.0. (cherry picked from commit 1b60933)
…n the namespace backend (#34339) Main pins every renameable parent of an app-declared credentialMasks file on the namespace backend, before the masks. An app update replaces apps/<app> from the gateway's namespace and renames data/ into the new folder; a mask or a data/ pin placed through a pin of the old folder stays with the retired folder, so a running session reads the restored credential plain. The folder of each declaring app, apps/<app>, now leaves parent_pins and is bound over itself after every mask (mask_parent_pins, pin_mask_parents). The set of pinned folders is unchanged; one pin per app spelling, none nested, so the mount count does not compound. The replacement apps/<app> an update creates is still renameable by a session already running until its next spawn; that is stated in the spec and the manifest reference. Original author: JLargent. Conflict resolved on release/0.13.0. (cherry picked from commit 716a6a4)
#38303) AcpClient now waits for the user systemd manager to move its spawn's pid into the cgroup scope before it writes initialize, as AcpRuntime does. - _spawn names the scope kirocrew-cl-<process instance>.scope through scope_unit_name and name_scope_unit, which take a prefix that defaults to the runtime's kirocrew-rt-. Readers of runtime scopes skip the new prefix. The token is not written to the child's environment. - _admit_scope runs before initialize in _initialize_session and in the entitlement probe. Admission can use the 240 s window less a 30 s reserve, and initialize gets the rest, never less than the reserve. - A timeout raises AcpScopeNotAdmitted (an AcpError, transient False), and ensure_ready ends the start without its retry. An exit raises AcpProcessDied with the stage's death text, which keeps its one retry. - scope_admission.published_stderr_tail serves both drivers, and log_stage takes the driver's logger. - The AcpRuntime handshake test also pins that a passed budget is the timeout initialize is sent with. Fixes #37007 (cherry picked from commit ce21fa1)
…#36668) The KAS engine creates a session's code tool, and answers _kiro/codeIntelligence (/code status and init), only when the client's initialize enables settings.codeIntelligence. Kiro Crew sent an empty settings block, so no KAS session ever had the tool and /code always answered "not enabled", although the default agent spec grants code. The KAS handshake now enables it unless the operator turned code intelligence off in kiro-cli: chat.enableCodeIntelligence false in the global or workspace cli.json (the workspace file winning, as in kiro-cli) sends enabled false, as kiro-cli's own KAS client does. Which agent is offered code is still its spec's tools list, which the engine applies. Once the tool exists, the default spec's allowedTools grant of code would have let the gate's spec-builtin-grant row approve every KAS code call with no prompt, including LSP-backed ones that start the language server the workspace's .kiro/settings/lsp.json names. So crew_answered_builtins never returns code: each KAS code call reaches the same tiers as on kiro-cli, where a proven tree-sitter lookup passes the read-only tier and anything else asks. The acp-client, security and harness-parity specs say when code intelligence is on for KAS, when an agent is offered code there, that a language server can start on the first LSP-backed call, and that Crew does not answer code calls there. Closes #25729 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Original author: Bolin Chen. Conflict resolved on release/0.13.0. (cherry picked from commit 8b03bc6)
The live-owner condition in runtime_reconcile shelters an unrecorded harness only through a recorded live process carrying the same KIROCREW_SPAWN_INSTANCE. AcpRuntime writes that stamp on its child, but AcpClient._spawn kept its instance out of the child's environment, so a harness started from a client-spawned session's shell tool carried the spawn marker with no instance and was killed at the first reconcile pass after the age floor while its session was still serving. Write KIROCREW_SPAWN_INSTANCE and KIROCREW_SPAWN_HOME through LaunchRequest.env_after_marker, as the runtime does, using the instance already minted for the scope unit name. Closes #38809 Co-authored-by: icyasblue <7155042+icyasblue@users.noreply.github.com> Original author: Angelo Yu. Conflict resolved on release/0.13.0. (cherry picked from commit 12d8a9c)
A session kept the sandbox tier it was started with, so making the setting stricter reached only sessions started afterwards. Each session started under a looser tier now restarts under the new one at its next turn and keeps its conversation; a turn already running finishes first. Closes #5031 Original author: Bolin Chen. Conflict resolved on release/0.13.0. (cherry picked from commit 14c6b6c)
* fix: end the turn when the agent never confirms a stop When a person pressed Stop and the agent never answered it, the chat could report the turn as stopped while the agent kept working on it, so its tool calls still landed afterwards. An unconfirmed Stop is now treated the same way as a Stop whose wait for confirmation ran out: the turn is ended on the agent, the session is reset and started again. A Stop the agent does confirm still ends softly, as before. Closes #37650 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: wait on the turn's own signals instead of a fixed-sleep pump --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Original author: Bolin Chen. Conflict resolved on release/0.13.0. (cherry picked from commit ca39700)
…34056) A verb read through a bare glob such as s?h turned glob host matching off, so s?h -F /dev/null local* id was allowed. In a directory holding files named ssh and localhost, which an agent can create, the shell expands it into an ssh connection to this host outside the sandbox. Keep glob host matching on when bash runs the glob verb: in program position, or as the program a command wrapper runs (resolved by argv_rules._program_index). A glob verb that only sits in another program's operands keeps main's reading, so tar, git add and find lines over globs stay allowed. The verb gate splits words at command separators and parentheses, so a glob verb inside a subshell, a command substitution or after a glued ";" is read too, and an assignment that opens a $( hands the program position to the substitution's own program. The gate also cuts words at the sentinels that stand for a quoted separator, so echo "$(s?h localhost id)" is read like its unquoted form. The gate words, the glob test, the ssh-family verb set and the quoted-separator sentinels live in a new owner module, argv_floor_ssh_gate, which keeps argv_floor_ssh under the line cap. The ssh gate is one more owner module on every MCP server listing path, so each server ceiling in test_mcp_listing_import_budget.py rises by 1. Original author: Ray Xu. Conflict resolved on release/0.13.0. (cherry picked from commit ed37d89)
The ssh-to-self floor reads a static echo/printf substitution as its first word, so a later command of a list inside it was never judged: `echo $(echo hi; ssh -p 22 <this host> id)` and the `&&`, `||`, `|`, newline, backtick, double-quoted, `bash -c` / `eval` payload and heredoc forms got past the floor, although bash runs every command of the body. Main's floor stays as it is. A new module, argv_floor_ssh_bodies, adds one check that can only refuse: each live `$( )` or backtick body, found with the shared quote-aware readers, is judged as a command line of its own, one nesting level at a time, and so are the bodies inside each `bash -c` / `eval` payload. An escaped backtick span is judged both as written and spliced, since one quoting level down it runs. Based on #37037 by CrysisDeu. Closes #36949 Co-authored-by: Zezhen Xu <32421101+CrysisDeu@users.noreply.github.com> Original author: Ray Xu. Conflict resolved on release/0.13.0. (cherry picked from commit 7d3c5e2)
…37964) #37875 made the gate refuse any command nested past 32 substitutions before a floor reads it, so the 128-level nest in #37820's test is now refused by that cap and the test, which expected the ssh floor's rule, is red on main. The test now checks the floor's bound at exactly 32 levels, which the cap lets through, and that 128 levels get the cap's own refusal. Closes #37963 (cherry picked from commit 529da1e)
… unnarrowed KAS children (#39212) A shared claude session now reads the held-limit asks of the Bot behind it at prepare, and its envelope adds an mcp__<server> ask for each server the start sends when a held limit covers MCP, matching the per-session client. held_child_spec now refuses (HeldLimitsNotApplied) when the session's Bot holds limits and the child spec could not be narrowed, instead of returning the spec unchanged; KAS session start turns it into AcpAgentUnavailable and a sub-agent target is left unregistered. A migrated.json nested too deep to parse reads as unreadable, like any malformed ledger. Original author: Joe Guo. Conflict resolved on release/0.13.0. (cherry picked from commit 34cec5c)
…does The picks in this batch take acp/types.py to 2,002 lines, past the 2,000-line cap. Main moved the provider labels into acp/provider_labels.py (inside #37974, a feature not on 0.13), and types.py re-exports them. This commit makes the same move here, without the Antigravity row, so the file layout matches main. No behaviour changes: every name still imports from kiro_crew.acp.types.
Sensitive Change ReviewSensitive files changed:
How to clear this check:
Only the author's comment counts this way. A reviewer can instead |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This is a backport of fixes already merged on main. Every pick names a bug a 0.13 user hits, and the one release-only commit is required by the 2,000-line cap. What this change shipsInventory (8 items) — 7 justifiedIntent: 0.13 users get the main-branch fixes for KAS start and sign-in, security gates, Bots and MCP loading without waiting for the next line. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 46fe47d Description read[DESCRIPTION-READ] 93fae293101692faf3ed92c1f5f543de09133f2b97c2f0d1e64255df3e49cb25 That sha256 names the PR description this verdict read. Recompute it with |
Security Scope Review -- 🔴 could not complete (fails closed)No scope verdict for |
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: |
Problem / Motivation
Goal: 0.13 users get the KAS, security, Bot and MCP fixes merged on main since the 0.13 fork that fix bugs they will hit.
release/0.13.0 forked from main at
91aa0e199ca. Since then main merged 629 commits that 0.13 does not have. Among them are many fixes for bugs a 0.13 user can hit today: KAS starts that hang or fail, sign-in errors, MCP servers that do not load, security gate gaps, and Bot runs that stall.Why it matters
0.13 is the next stable line. Without these picks, its users keep bugs that main already fixed, including Slack-reported ones (#38053, #38127, #38376, #38732, #38759, #38761, #38830, #39046, #38810, #37627, #38076).
Not a goal
What changed (motivation → approach → change)
Stacked on #39316 (PR A): merge #39316 first. Until it merges, this PR also shows A's six commits (#37954, #38078, #38221, #38339, #38919, #38822); after A's rebase merge they drop out on a rebase. #38761 and #38978 do not apply without A.
Each commit is a
git cherry-pick -xof a main commit, except the last one. Every pick carries its(cherry picked from commit …)line. The last commit is release-only: the picks takeacp/types.pyto 2,002 lines, past the 2,000-line cap, so it moves the provider labels intoacp/provider_labels.pythe way main did inside #37974 (a feature).provider_labels.pyequals main's file minus the Antigravity row, and every name still imports fromkiro_crew.acp.types.The bar. A pick fixes a bug a 0.13 user will plausibly hit and that hurts (crash, hang, data loss, a refusal that blocks a feature, broken sign-in, KAS breaking), a security gap, a Slack-reported bug, or a 0.13-new feature that is broken without it. Its prerequisites come with it. Polish, wording, small UX nits, rare edge cases, non-severe performance work, refactors, CI/test/docs and features are not picked. Borderline items are listed under "Not picked, maybe" so they can be added. The table below gives one line per pick on what breaks without it.
Order. The picks that applied cleanly, in main's order. Then the picks that needed a conflict resolved, in main's order among themselves. Then the release-only commit.
Prerequisites pulled in: #37932 (for #38512), #38411 (for #38303 and #38810), #37008 and #38303 (for #38810), #37964 (test follow-up to #37875).
Conflicts and how each was resolved (each commit body also says so):
kas_memoryimport (the memory preview, feat: add an opt-in Kiro memory preview #36872, is a feature not on 0.13), so onlyscope_admissionwas added.runtime_spawn_launch.py. Put thecodeIntelligencelines where main has them, without the memory-preview block. Dropped one hunk of a memory-preview test that 0.13 does not have.acp_launch_goldens.json. Dropped the Antigravity entry (that harness is not on 0.13).session_allocation.py. Added theevictionowner to the docstring and owner list, withoutmemory_policy.host_authonly.test_mcp_listing_import_budget.py. Raised 0.13's four counts by one each time, the same step main took.test_mate_held_rules.py. Kept only this fix's new tests; the context tests belong to fix(lts): an org ask on web fetch/search always reaches a person #39059 (LTS), not picked.Conflicted picks are committed under the public identity, because this clone's leak guard refuses a hand-made commit with another author's email; the body of each names the original author. Clean picks keep their original author and main's message.
Backwards compatibility
Compatible: every pick is code already on main; the one release-only commit moves constants and re-exports them from the old import path.
Removes nothing: these are fixes as merged on main; any take-away each one makes was reviewed on its own main PR.
Tests
The tests each fix added come with it. On this branch, one pytest process at a time, no
-n:test_sandbox_refactor_generated_programs.py::test_the_seatbelt_profile_is_the_golden, also fails on a cleanrelease/0.13.0checkout here.Website: the 9 changed vitest files pass (329 tests);
src/i18nwithI18N_BASE_REFset passes (1261 tests, 0 skipped);tsc -p tsconfig.app.jsonpasses. mypy (4757 files), flake8 and isort on the changed files, and the line-cap gate pass.Proof: not provable -- other: a backport of fixes whose proof ran on their own main PRs
Manual verification
N/A — each fix was verified on its own main PR; this batch only carries them.
Related Issues
Backport batch for release/0.13.0.
Sibling sweep
Siblings: none -- a backport; each fix's sweep is recorded on its own main PR
Pattern harvest
Not generalizable: a backport; the patterns are recorded on each main PR
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...) — a multi-pick batch, rebase-mergedPicks
944c87d636b5abc52be3a7c7c9357b2f1675a53a27aa9782f63fd998b4af42bda263d5b456f5d1013d4abb4e0637f3ebbad8082d3afb68febc098cc9782d09fcb19f8902158cd2608e257adb479945f61f0b5db6395c5c5f37fa3e4fd8d3d120ec2009ebcc08967dffc6c251e96065adbd7a8beaf270ece3593de505c76bc32f2c3f75dd7e3e762b59c75b977e6a4a43911c2998368a0689932562e57685a5dec371a242bfb228f74a352539737a2ab2f588907dcc4d091608ac3cdb620341b73913dc530cc45f94f35c565ea2ccde976e55f83fed049a8126626ecea4efe2819d3f4754acdc8af47c07bfbfc2f68c7022721b609330754716a6a4090e7e15354ba67ce21fa1f01d8b03bc67bb212d8a9c27a414c6b6c9485ca397001cd00ca13b001b6ed37d89dc017d3c5e2f730529da1ee27a34cec5cc70dacp/types.pyto 2,002 lines and the line-cap gate failsNot picked, maybe
Each line says what a user hits without it. Ray or Bolin can add any of these.
Blocked by a conflict (needs a feature or a wide change not on 0.13)
Not applicable on 0.13
kas_memory_mode; the pick raisedNameError.Borderline (below the bar as judged here)