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 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)
… per repeat (#37883) A stall wake is keyed on its episode (status, the newest report of another status, an unanswered decide, wake_at, session gone) instead of the last report's stamp, so a worker that reports progress and stops again is one stall; the observation key carries the episode so the kernel mask does not hide a re-armed stall. A blocked or question report that repeats the worker's previous report wakes nothing even across the conductor's own decide, unless its reason differs from the cause last delivered or a question's summary changed. An item with an open ask record raises no stall wake while its worker session is open. Co-authored-by: Joe Guo <zejiangg@amazon.com> (cherry picked from commit 4175fc5)
…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)
…t engine (#37897) #37744 replaced every exception text in _kas_call with a fixed line, which also hid AcpAuthRequired: its text is the host-written sign-in remedy. Show that text (redacted); every other exception keeps the fixed line. Closes #37894 Co-authored-by: Joe Guo <zejiangg@amazon.com> (cherry picked from commit 47e5953)
…ch directory (#37826) A resumed chat binds the scratch directory it was recorded in, and the chat runtime sharing key carried that directory. Sessions of one tree that had run on separate processes recorded one directory each, so after a gateway restart they never matched again and the tree stayed split on every restart. shared_scratch leaves ChatRuntimeKey: sessions of one tree share by tree_root. A joiner runs in the directory the process it joins mounts, which the start path already records. The restart-only join on a matching tree (_join_own_tree, RuntimeOwnership.join_on_tree) and the founder's published key (_published_key_for, acquire's published_key) existed only to work around the keyed directory and are removed. A joiner's earlier recorded directory is not mounted, and its owner is a process that exited with the gateway, so the sweep would reclaim it an hour after the join. ChatSharePlacement.place holds that directory for the sweep's grace window before the acquisition (agent_scratch.shared_scratch_window, as a spawn holds a tree it mounts) and, right after a join and before any session setup, adds the joined process to its owner marker (agent_scratch.adopt_owner) with a WARNING naming the session and the directory: it stays on disk while the tree's process runs and is then swept by the ordinary rules. Unless the marker then reads back naming the joined process (an unowned tree answers "recorded" without a write; "unwritable", "stale", "refused" and "garbled" keep nothing), the join is given up and the session founds its own process, which mounts the directory. A failure or cancellation in that step releases the joiner's lease before it propagates. Closes #37816 Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com> (cherry picked from commit 93511d9)
Co-authored-by: Joe Guo <zejiangg@amazon.com> (cherry picked from commit 9782f63)
A prompt entry (send_message, send_message_stream, stream_events) clears _turn_done before it sends, and only _prompt_loop sets it again. When the entry ends before its prompt goes out (ensure_ready or _send_prompt raises, or the turn is cancelled there), _turn_done stayed clear. On claude that keeps the idle reader off until the next prompt, so a reply Claude Code sends on its own meanwhile (a background command finishing) waits in the pipe and shows under the user's next message. A later Stop's wait_turn_done also waited out its whole budget. Each entry now sets _turn_done on that exit and offers the idle reader a restart. On every other backend the restart is a no-op. Refs #17566 Co-authored-by: Joe Guo <zejiangg@amazon.com> (cherry picked from commit 5d92564)
* 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)
…38144) When KAS answers a prompt with a sign-in refusal, the ACP error formatter writes the KAS signed-out sentence and appends "Switching models will not help ..." and, when the frame has one, the request id. kas_signed_out_route matched the sentence only exactly, so that row got no kas_signed_out notice token and stayed English in every dashboard language, beside a translated Sign in button. The recogniser now accepts the sentence when it leads the row, alone or followed by more text after a space. The row's own text is unchanged; the translated copy leaves the appended tail out. Part of #38104 (cherry picked from commit 8213131)
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)
… id (#38117) * fix(connections): answer a kas connection call with an offered option id On KAS a Crew-owned Connection call is asked through an explicit ask rule, which offers no allow-always option, so the request recorded its one allow id (accept) in both slots. The once-only downgrade then sent the canonical allow_once id, which KAS never offered and reads as a refusal: every approved Slack call ended as 'The user rejected this tool call.' with no card and no proxy call. once_for_always now answers with the offered once id whenever one was recorded. * fix(acp): never answer an always-only frame with its allow-always A frame that offered allow_always alone records that id in its once slot too, so returning the recorded once id sent Copilot an allow-always and it stopped asking. The recorder now marks such a frame (RECORDED_ALWAYS_ONLY) and once_for_always answers it with the canonical allow_once, while KAS's explicit-ask frame, which offers allow_once alone, still gets its own accept id. (cherry picked from commit 9e109d1)
…38081) * fix(approvals): stop logging an expired approval as a user rejection A cron, task-runner or other background turn asks the gateway's interactive approval, which waits a short window on Slack and the dashboard. When nobody answered, the window closing returned False, the same value as a person's Deny. The permission resolvers therefore audited the call as the person's rejection (interactive_rejected on the headless funnel, a bare responder rejection on the task-runner and subagent ladder) and sent no notice, so the agent told the user they had refused. The resolvers now watch each approver wait (approval_expiry_watch), and the two places a window closes unanswered, the Slack wait and the dashboard coordinator's timeout, mark it (note_approval_expired). A marked refusal is the host's: audited with reason approval_expired and steered with the existing approval_timeout notice before the reject. The dashboard chat runner already steered its own expired prompt as the host's; its SEL row now carries the same approval_expired reason instead of interactive. A person's Deny is unchanged. * test(approvals): move expiry tests out of test_tool_permission.py to stay under the line cap The expiry tests this PR added to test/test_tool_permission.py took it past the 2,000-line cap. The CallbackResponder expiry test and the subagent and task-runner approval_expired row checks move to test/test_tool_approval_expiry.py, reusing the ladder adapters from test_tool_permission. The rung-enumeration helper adds approval_expired in place, so test_tool_permission.py is back to its 1,998 lines. (cherry picked from commit 4aec9c9)
…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)
…38101) Finished-run eviction kept only the 50 newest finished runs, so a failed run older than that left memory and Retry failed answered 404. Failed runs with no retry or continuation now count against their own bound (MAX_RETAINED_FAILED, oldest dropped first). A retry of a run that is on disk but not in memory (after a gateway restart) is refused with a typed 409 retry_unavailable instead of being replayed from the redacted task. Fixes #38091 (cherry picked from commit 7a6c9dc)
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)
…#37828) Move the mcpServers projection (_project_mcp_servers and its constants) into acp/kas_agents_mcp_servers.py and the session-level hoist (hoist_servers_for_session and its helpers) into acp/kas_agents_session_hoist.py, verbatim. kas_agents.py drops from 2,004 to under 1,450 lines and becomes a _facade_mirror facade over those owners and kas_agents_registered.py, so every name stays importable and patchable at kiro_crew.acp.kas_agents. No logic change. Part of #36565 (cherry picked from commit 31cc202)
…does The picks in this batch take acp/types.py to 2,006 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.
release/0.13.0 backport scan (main after 91aa0e1)Main at scan: Counts per class
Every commit (part 1 of 2)
|
Every commit (part 2 of 2)
|
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 Every item is a fix already merged on main, or a prerequisite one of those fixes needs. The one commit made only for this release moves code to stay under the 2,000-line cap that AGENTS.md sets. Notes
What this change shipsInventory (10 items) — 9 justifiedIntent: 0.13 users get the kirocrew-lite, knowledge, KAS, security, Bot and MCP fixes main already merged. This is a FIX (a backport).
[FIRST-PRINCIPLES-REVIEWED] f4b6bb5 Description read[DESCRIPTION-READ] 1d0cdcfa90a648ab24df55e7458fd5b4b98311feb5c07f2a8b73ab8f97dd4a6d 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 main's kirocrew-lite and knowledge fixes, plus the KAS, security, Bot and MCP fixes merged on main since the 0.13 fork.
release/0.13.0 forked from main at
91aa0e199ca. Since then main merged 629 commits that 0.13 does not have. Among them are the four kirocrew-lite and knowledge fixes Ray named (#37954, #38221, #38822, #38919), and 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).
Not a goal
What changed (motivation → approach → change)
Every commit but one is a
git cherry-pick -xof a main commit. Bolin also rebuilds release from main, so each pick carries its(cherry picked from commit …)line. The one release-only commit is theprovider_labels.pymove (row 91), explained below.Order: Part 1 (the named fixes) first, in main's order, with #38078 as the prerequisite of #38221. Then the scan picks that applied cleanly, in main's order. Then the picks that needed a conflict resolved, in main's order among themselves, so they sit after the clean ones. Then #37828 and the provider-label move.
How the picks were chosen: every commit on main after
91aa0e199cathat 0.13 lacks (as an ancestor, or as a pick carrying the same(#N)) was classified. The full table is in a PR comment. Picked: KAS and harness fixes, security fixes, Bot and crew fixes, OAuth and MCP fixes, crash, hang and data-loss fixes, and Slack-reported fixes.Conflicts and how each was resolved (each one also says so in its commit body):
KnowledgeSpecUnconfirmedsentences.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.acp/kas_agents.py, which is 2,004 lines on 0.13, under the 2,000-line cap. It applies cleanly and the result equals main's file.acp/types.pyto 2,006 lines. Main moved the provider labels intoacp/provider_labels.pyinside feat: add Google Antigravity ACP harness #37974 (a feature). The last commit makes the same move, without the Antigravity row.provider_labels.pyequals main's file minus that row, and every name still imports fromkiro_crew.acp.types.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. Internal email lines in
Co-authored-bytrailers of hand-made commits were dropped; clean picks keep main's message as is.Dropped after picking: #38108. It forwards
kas_memory_mode, which only the memory preview defines, and raisedNameErroron 0.13.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:release/0.13.0checkout here:test_sandbox_refactor_generated_programs.py::test_the_seatbelt_profile_is_the_goldenand twotest_folder_steering_provider_dedup.pytests.kas_agentsoracp.typesran again: 2,024 passed.Website: the 10 changed vitest files pass (338 tests);
src/i18nwithI18N_BASE_REFset passes (1261 tests, 0 skipped);tsc -p tsconfig.app.jsonpasses. mypy, flake8 and isort on the changed files, black, subprocess-encoding, comment-history, brand and line-cap gates 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
38f4a31d1cec87ea0c41f21271ebd1274421f3c8fe2228530a46b81944c87d636b5abc52be3a74175fc51865c7c9357b2f147e595320e093511d93638675a53a27aa9d9ede9556a9782f63fd99d01383405f4d5b89d8d7088b4af42bda25d92564266363d5b456f5d1013d4abb4e0637f3ebbad8082d3afb688213131ab15febc098cc979e109d142ab4aec9c9252882d09fcb19f8902158cd2608e257adb477a6c9dc9ff60fda5a7d6c59945f61f0b5521ee4dae20db6395c5c5f37fa3e4fd8d3d120ec2009ebcc08967dffc6c251e96065adbd7a8be70b3be5de562381b7b65efaf270ece3593de505c76bc32f2c3f75ddc21232816cdbaaf18d11ab3e905a40a54391f91a61247e3e762b59c75b977e6a4a43911c299835672158181968a0689932562e57685a5dec371a242bfb228f74a352265c0e2a9d1539737a2ab2f588907dcc4d091608ac3c45dc4dd2b53b0520dd08c0d76732d7c36db620341b732ccb6cd2c5c913dc530cc45f94f35c565ea2ccde976e55f83fed049a8126626ecea4efe2819d3f4754acdc8af47c07bfbfcc803034c7f52f68c7022721b609330754716a6a4090e7e15354ba67ce21fa1f01d8b03bc67bb212d8a9c27a414c6b6c9485ca397001cd00ca13b001b6ed37d89dc017d3c5e2f730529da1ee27a34cec5cc70d31cc202da14Not picked, maybe
Conflict-blocked (each needs a feature or a wide change not on 0.13)
Not applicable on 0.13
kas_memory_mode, which only the memory preview defines (dropped after aNameError).Other user-facing fixes, not picked (maybe)
These are fixes a 0.13 user could hit, mostly smaller dashboard, Windows, wording and log fixes. They apply to the next batch, or to Bolin's rebuild from main.