Skip to content

fix: backport four user-reported KAS and MCP fixes to 0.12.1 (batch 28) - #32174

Merged
buluoray merged 4 commits into
release/0.12.0from
crew/slack/0.12.1-batch-28
Nov 7, 2026
Merged

buluoray merged 4 commits into
release/0.12.0from
crew/slack/0.12.1-batch-28

Conversation

@buluoray

@buluoray buluoray commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Above the small-diff bar, user-reported; needs Bolin's OK before merge. Each pick is larger or touches more shared code than the low-risk 0.12.1 batches, so they are in a PR of their own.

Problem / Motivation

Goal: Bring four user-reported KAS and MCP fixes that merged on main after v0.12.0 onto release/0.12.0, one commit per fix, in a PR of their own so they can be reviewed and reverted apart from the low-risk batches.

Why it matters

PR Reported in What a 0.12.0 user sees today
#31875 #13305 (sandlerr) A custom agent's persona reaches the model twice on KAS: once from the spec prompt KAS reads, and again from Crew's context injection.
#31562 #4970 (mcmathews) ${VAR} env placeholders on MCP servers in ~/.kiro/settings/mcp.json are reported as never expanded; this fix names a placeholder that will not resolve.
#31337 #26315 (christopher-h-johnson) An app agent that lists @kirocrew-computer times out KAS readiness when computer use is off.
#31513 #30920 (an internal user's report) and #31115 Chat processes restart every one to two minutes and re-spawn OAuth MCP servers, so a browser sign-in tab opens and closes dozens of times a day; a server the owner turned off in MCP Management still starts on the gateway-routed path.

Not a goal

What changed (motivation → approach → change)

Each main squash commit was cherry-picked with -x onto release/0.12.0 @ 4d9f6b123e, in merge order, one commit each.

# PR main commit release commit Pick
1 #31875 send a custom agent's prompt once on KAS 568b039b3c 60c325a078 one doc hunk resolved by hand
2 #31562 name an MCP env placeholder that will not resolve 2c8e9aa070 24662bfd24 clean
3 #31337 keep a gated managed server out of app agent specs e37780db63 23b2c755d7 clean
4 #31513 do not wrap a server a config scope mutes 25a74e8c5e aa1a4dcd99 clean

The one hand-resolved hunk is documentation. In #31875, docs/architecture/context-management.md conflicted in one table row. It was resolved by keeping this branch's text and adding #31875's clause about a KAS session start. Every other file in #31875, and every file in the other three picks, has added and removed lines identical to its main commit. Because of the resolved hunk, #31875's commit is authored with the public identity the push guard requires and names Bolin Chen as the original author in its message; the other three keep their original authors.

builder-security checked: no pick changes a bind, a listener, a route, an auth check, an ingress rule or a storage grant. #31513 changes which MCP servers the MCP gateway wraps, so a server a config scope mutes is not started; it adds no new endpoint.

Backwards compatibility

Compatible: each change is the one already merged on main, and each PR's own compatibility note applies unchanged.

Removes nothing: no pick hides, deletes or renames anything 0.12.0 accepts.

Tests

Proof: not provable -- other: a backport of main commits whose proofs ran on their own PRs

  • CI does not run the backend suite on PRs into release/*, so the related set was run here: every touched test file plus every test file that imports a touched module, 164 files, one pytest process per batch of 20, -n 0. 8122 passed. 3 failed, and all 3 fail the same way on a clean release/0.12.0 checkout: test_acp_launch_goldens.py::test_the_client_launch_hands_child_env_defaults_to_kiro_cli_alone[copilot], test_acp_launch_goldens.py::test_the_launch_of_every_known_harness_matches_the_golden[copilot] and test_harness_parity.py::test_is_kiro_cli_is_positive.
  • No frontend file changes.
  • flake8 passes on the changed Python files.

Manual verification

N/A - every pick was verified on its own main PR. The 0.12.1 RC soak is the end-to-end check.

Screenshots / video

Why no screenshot: backend-only change.

Related Issues

Backport to the 0.12 line for 0.12.1 of #31875, #31562, #31337 and #31513. Source issues: #13305, #4970, #26315, #30920, #31115.

Sibling sweep

Siblings: none -- each source PR carried its own sibling sweep; this PR only carries those fixes.

Pattern harvest

Not generalizable: this PR only carries fixes already on main. Each source PR has its own harvest.

Checklist

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

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

buluoray and others added 4 commits November 7, 2026 07:00
A KAS session is handed a custom agent's own prompt on its wire
definition, and the runtime records that text in the session's native
documents. The session-start [AGENT SYSTEM PROMPT] block repeated it,
so the persona reached the model twice. The block is now withheld when
it would repeat that recorded text word for word; any other text, and
the turn after a compaction, keep it.

The record is written only where KAS is known to apply the prompt: a
relay kiro-cli at or above the release floor. Crew's bundled engine and
an older or unreadable release record nothing, so the block stays.

Part of #13305

(cherry picked from commit 568b039)

Release backport: docs/architecture/context-management.md conflicted
in one table row; resolved by keeping release's text and adding this
change's clause. Code and tests applied unchanged.

Original author: Bolin Chen (#31875).
An MCP server whose env holds ${NAME} or ${env:NAME} for a variable
the gateway does not have starts with the literal text as that value.
The usual cause is an app opened from Finder or the Dock: it inherits
launchd's environment and never reads the shell profile that exports
the token, so the server answers every call with an authorization
error and nothing in the session says why.

At session start, beside the remote-header secret:// guard it mirrors,
mcp_ref_guard.warn_unset_env_placeholders names each such stdio server
and variable in one log line and on the session's MCP problem summary.
Names only, never a value: a reference that is not a plain identifier,
such as ${NAME:-default}, is skipped. The server still starts as
before, so the names-only summary a spawned run's prompt gets leaves
the entry out. Each server is judged against the environment that
expands it: the kiro-cli child's scrubbed environment for a spec
server kiro-cli starts itself, the routed path's placeholder view for
every other. Both composition sites, AcpClient and AcpRuntime, call
it.

The macOS troubleshooting guide gains a section on the symptom, how to
spot it, and the two routes that supply the value whatever the launch
path: the vault with a routed server, or the data home's .env file.
The owning spec in docs/architecture/mcp.md records the check, and the
two descriptions of ACP_BACKENDS_SPEC_SERVERS_OFF_WIRE name it as a
reader.

Closes #4970

(cherry picked from commit 2c8e9aa)
An app agent that lists @kirocrew-computer timed out KAS readiness
while computer use was off: the app-agent copier read the managed
server's invocation directly and skipped its spec_gate, so kiro-cli
spawned a backend that advertised no tools.

Both copier paths now resolve through managed_mcp_spec_entry with
include_opt_in=True, so a gate-closed server is not copied and an
opt-in server an app agent names still is. The computer-use enable
flip re-materializes every enabled app's agents, each under its
app lifecycle lock, so app agents follow the flip without a restart.

Builds on #26325 by christopher-h-johnson.

(cherry picked from commit e37780d)
POST /api/mcp/toggle writes a mute into the kiro global or the crew store,
never into an agent file it does not own. The rewriter's wrap guard read only
the entry in front of it, so an agent-declared server muted in a scope was
wrapped into a broker stub. The KAS projection subtracts a stubbed name before
its own scope check (#30924) runs, so the session-level stub started the
server the user turned off.

mcp_cleanup.mcp_scope_muted_aliases is the scope half of
mcp_server_muted_in_any_store, read once per rewrite pass. The per-agent wrap
guard, the settings injection and the crewmate half skip a name it holds, and
withdrawn_worker_stubs withdraws one. The set is fingerprinted (schema 13), so
a mute saved in the crew store, which the fingerprint did not sign, cannot be
served from a cached overlay. On a pass whose settings file cannot be signed
the set is held only to "no new mute", since that file is one of the scopes.

Closes #31115

Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com>
(cherry picked from commit 25a74e8)
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 7, 2026 07:16
@buluoray
buluoray requested review from tim-finnigan and removed request for a team November 7, 2026 07:16
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision aa1a4dcd999bd12f84b387a3e242f9a3d587f4a5 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: these are four clean backports of fixes already merged on main, one commit each, with only one documentation hunk resolved by hand.

Notes

  • CI does not run the backend suite on PRs into release/*, so the only proof for this branch is the local run of 164 related test files. Attach that run's log to the RC soak record so the three copilot/harness-parity failures that already exist on the base stay on file.

[DESIGN-REVIEWED] aa1a4dc

Description read

[DESCRIPTION-READ] 2d5b43f72d2d244ba458deaa9dda24a3d227eb74568cc3d87588bd2d22544198

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

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

First-Principles-Verdict: PASS

Nothing blocks. Each of the four picks is a fix already merged on main with a linked user report, and none deletes a pin or changes a default.

What this change ships

Inventory (8 items) — 8 justified

Intent: give 0.12.x users four user-reported KAS and MCP fixes from main without upgrading; a FIX (backport).

  1. On KAS through kiro-cli 2.33.1 or later, a custom agent's persona reaches the model once at session start instead of twice (Persona delivered twice: native spec-prompt read overlaps the context.py injection #13305) — justified
  2. A respawn onto the bundled engine no longer counts the persona as applied natively, so the injected block comes back — justified
  3. A ${VAR} placeholder on an MCP server that will not resolve is now named in a warning (MCP servers in ~/.kiro/settings/mcp.json: ${VAR} env substitutions are never expanded #4970) — justified
  4. An app agent that lists @kirocrew-computer while computer use is off no longer gets that server copied in, so KAS readiness no longer times out (App agent with @kirocrew-computer times out KAS readiness when computer use is off #26315) — justified
  5. That gated server is no longer reported as an unresolvable tool reference — justified
  6. Turning computer use on or off in the dashboard now also rewrites every enabled app's agent configs — justified
  7. A server a config scope mutes is no longer wrapped or started on the gateway-routed path (Chat processes restart every 1-2 minutes and re-spawn OAuth MCP servers; no persistent way to turn off one MCP server #30920, KAS: the gateway-routed MCP path still starts a server the owner turned off in MCP Management (follow-up to #30924) #31115) — justified
  8. App-agent managed-server resolution now goes through the shared managed_mcp_spec_entry helper instead of its own copy of the invocation logic — justified

[FIRST-PRINCIPLES-REVIEWED] aa1a4dc

Description read

[DESCRIPTION-READ] 46d3b9196fb11e94747c4f18356cf14a4cef73e223ef60d6aa5dce269e271469

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

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] aa1a4dc

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

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

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] aa1a4dc

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

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@buluoray
buluoray merged commit 1e34239 into release/0.12.0 Nov 7, 2026
20 of 23 checks passed
@buluoray
buluoray deleted the crew/slack/0.12.1-batch-28 branch November 7, 2026 15:55
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants