Skip to content

fix(acp): carry brace globs and the 120 s MCP start budget on KAS resume - #32602

Merged
bolichen97 merged 2 commits into
mainfrom
fix/kas-mcp-brace-resume-timeout
Nov 8, 2026
Merged

bolichen97 merged 2 commits into
mainfrom
fix/kas-mcp-brace-resume-timeout

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On the KAS backend, a kiro-cli agent's MCP disabledTools globs and its 120 s server start budget hold the same way they do on kiro-cli, in a resumed chat as well as a new one.

#30712 left two gaps, tracked in #32598. I re-checked both on main 20764b5993, and both are still open:

  • Brace globs switch nothing off. kiro-cli matches a disabledTools entry that holds * or ? with globset (agent/util/glob.rs, matches_any_pattern). So {read,write}_* turns off read_file and write_file. KAS's excludedTools knows only * and ?, and reads {, , and } literally (tools/tool-filter.ts, globMatch). Crew sent @server/{read,write}_*, which matches no tool. This happened for a spec's own servers (kas_tool_limits.disabled_tool_exclusions) and for mcp.json servers (kas_settings_mcp._glob_disabled_tools).
  • A resumed chat gave user servers 60 s. On session/load, hoist_servers_for_session(include_user_servers=True) moved user servers into the session-level mcpServers array. KAS's session-level element has no timeout slot (mcp/client-servers.ts), so those servers got KAS's 60 s default. fix(kas): carry kiro-cli mcp.json settings onto the KAS agent block #30712 recorded this as a shortcut: in finish_settings_mcp.

Why it matters

The first gap leaves tools on that the agent's author switched off. The second makes a slow first-run npx/uvx server fail only after a chat is resumed, with no clear cause.

Not a goal

What changed (motivation → approach → change)

Brace globs. The new kas_tool_limits.kas_globs turns one disabledTools entry into the excludedTools entries KAS matches the same way:

  • An entry without * or ? is kept as is, because both engines compare it exactly.
  • Each flat {a,b} group becomes one entry per branch. For example, {read,write}_* becomes read_* and write_*.
  • None is returned for a pattern KAS cannot match exactly: [...], ], \, **, a nested, empty or unbalanced brace, more than 64 branches (checked before the expansion is built), or more than 512 characters. The patterns can come from a settings file a checkout supplies, so the expansion never allocates past these limits.

The expansion is applied at all three places a disabledTools entry reaches excludedTools: a spec's own servers (disabled_tool_exclusions), mcp.json servers (_glob_disabled_tools), and the spec/global switches (with_switched_off_tools, which covers a declared server's global-settings globs).

A None pattern adds no restriction, per the maintainer's rule (review of 2026-11-08): it is carried as written, as on main, and the server runs. The agent is not refused and the server is not excluded whole. The person is told instead:

  • the session-start notice gets a line per pattern: "⚠ disabledTools pattern <pattern> for <server> can't be applied on KAS, so that tool stays on." (kas_tool_limits.unmatched_globs_notice; after eight lines, one more names the remaining servers);
  • each pattern is logged as a warning naming the server and pattern through sanitize_sink_text;
  • the harness gathers the patterns from the spec, the global settings file and the carried mcp.json servers, and skips a server KAS does not start (muted in the spec, or an mcp.json server the agent does not load).

Resume timeout. load_session no longer hoists user-declared servers. They stay in the agent block on session/load, as they do on session/new, so finish_settings_mcp gives them the 120 s timeout. KAS launches block servers on a cold session/load; the evidence is under Manual verification. Only Crew's managed servers and the builtin app servers move to the session-level array now, on both paths.

With the load-only user hoist gone, these have no caller left and are removed:

  • the include_user_servers and reserved_names parameters of hoist_servers_for_session;
  • session_mcp.settings_server_names;
  • kas_env_withhold._carries_env_reference.

The shortcut: comment is replaced, and docs/system-specs/modules/acp-client.md is updated.

Backwards compatibility

Not breaking. A pattern KAS cannot match exactly ([...], \, **, a nested or empty {}) behaves as on main: it is carried as written and its server runs. The only new output is the session-start notice line and the warning log. A flat {a,b} glob now switches off the tools it names, which is what kiro-cli already does with the same spec.

Reader: src/kiro_crew/acp/runtime_session_load.py:load_session -- chat -- the only caller of include_user_servers / reserved_names / settings_server_names; it now passes neither (test_kas_env_launch_resume.py).
Reader: src/kiro_crew/acp/kas_agents.py:hoist_servers_for_session -- chat -- the only caller of _carries_env_reference; the user-hoist branch it guarded is gone (TestUserServersStayInTheBlock).
Reader: src/kiro_crew/acp/runtime_session_create.py:create_session -- chat -- never passed the removed parameters; unchanged.

Tests

  • test_kas_settings_mcp.py::TestBraceGlobs: the kas_globs cases above; a spec server's {read,write}_* carried per branch; fs_[rw]* on a spec server keeps the agent and is named in the notice; a non-list disabledTools still refuses the agent, as on main; a global-switch brace glob carried per branch; an mcp.json server's brace glob carried per branch; an unmatchable glob on an mcp.json server keeps it running and is reported; the notice is sanitized and names every server past the eighth line.
  • test_acp_harness_contract.py: a declared server's global fs_[rw]* keeps the server in the block and produces the session-start notice; a muted spec server's glob produces none.
  • test_kas_env_launch_resume.py::test_a_resumed_sessions_snapshot_is_removed_at_shutdown drives the real load_session and checks that a user server stays in the registered agent block. It fails on main's production code (AssertionError: a user server stays in the block).
  • test_kas_agents_mcp_servers.py::TestUserServersStayInTheBlock: a user server stays in the block while the managed server moves with its session token.
  • The tests for the removed load-only hoist, reserved_names and settings_server_names are deleted, and the env-relay tests drop their load parametrization.

Proof: not provable -- other: prove.py reverts the new kas_globs too, so the changed test modules fail at import and no assertion runs. The resume test was run by hand against origin/main's src/ and fails as quoted above.

Manual verification

I probed KAS 0.66.91 (kiro-cli 3.1.0's engine) with a scratch stdio ACP client. It used a real kiro-cli acp --agent-engine v3, with an agent sending includeMcpJson: false and a scratch cwd. One stdio MCP server answers initialize after 75 s:

declared in session/new cold session/load (new process)
agent block, timeout: 120000 connected at ~79 s connected at ~77 s
session-level array failed at ~63 s failed at ~62 s

With a 2 s delay, the block server was started again by the cold session/load. The pinned 0.66.33 bundle was not run here, because this host's glibc 2.26 is below its 2.28 floor. acp-client.md already records a 0.66.33 probe that shows block entries start on session/load, a server first declared at load included. The 0.66.62 capture mcp-live-apply-live.jsonl shows the same.

Related Issues

Fixes #32598
Refs #30712

Sibling sweep

Swept: git grep -nE "disabledTools|excludedTools" -- src/kiro_crew/acp/ and git grep -n "include_user_servers\|reserved_names" -- src test
Sibling: src/kiro_crew/acp/kas_tool_limits.py -- changed here -- a spec's own servers' disabledTools
Sibling: src/kiro_crew/acp/kas_settings_mcp.py -- changed here -- mcp.json servers' glob disabledTools
Sibling: src/kiro_crew/acp/kas_tool_limits.py:with_switched_off_tools -- changed here -- a declared server's global-settings globs are expanded too
Sibling: src/kiro_crew/acp/runtime_session_load.py -- changed here -- the only include_user_servers=True caller

Pattern harvest

Not generalizable: the brace gap is specific to translating kiro-cli's globset into KAS's two-wildcard matcher, and the timeout gap was one hoist call site.

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.

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners November 7, 2026 20:32
@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 7bfb11e778065abb3f45cff2e607b151dd148d60 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 7bfb11e778065abb3f45cff2e607b151dd148d60 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. The brace expansion and the removed resume-time hoist both fix the stated gaps where they start, and the load path now does what the new-session path already does.

Notes

  • The resume change rests on the 0.66.91 probe. Nothing in CI catches a future KAS release that stops starting agent-block servers on session/load. If one does, user servers silently stop loading on resume. A captured-wire contract test, like the existing mcp-live-apply capture, would make that a red test instead of a field report.

[DESIGN-REVIEWED] 7bfb11e

Description read

[DESCRIPTION-READ] 06a7532430937732bd9496254d978e1f62be8c1c98432e0936a61359f74fc983

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 7bfb11e778065abb3f45cff2e607b151dd148d60 — 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 item is either the fix for #32598, a removal of code the fix leaves with no caller, or a declared notice for patterns that cannot be carried.

Not checked: that KAS launches agent-block servers on a cold session/load with the pinned 0.66.33 bundle (the author probed 0.66.91 only).

Notes

  • Item 4 — rides along: the notice is fed from three places (the harness's kas_globs(pair[1]) is None filter, unmatched_disabled_globs(projected.get("mcpServers")), and the new unmatched= parameter of stamp_settings_mcp). Subtraction: drop the unmatched parameter of stamp_settings_mcp and collect the mcp.json pairs once at the harness.

What this change ships

Inventory (7 items) — 6 justified

Intent: on KAS, a kiro-cli agent's disabledTools brace globs and its 120 s MCP start budget should hold in resumed chats as well as new ones. This is a FIX.

  1. A flat {a,b} disabledTools glob now switches off the named tools on KAS, for spec servers, mcp.json servers and global switches — justified
  2. User MCP servers in a resumed chat stay in the agent block and get the 120 s timeout instead of 60 s — justified
  3. Glob expansion is capped at 64 branches and 512 characters, so settings a checkout supplies cannot blow up memory — justified
  4. A new session-start notice line and warning log for each glob KAS cannot match, skipping servers KAS does not start — rides along
  5. After eight lines the notice names the remaining servers in one line — justified
  6. include_user_servers, reserved_names and settings_server_names are removed, since no caller is left after item 2 — justified
  7. _carries_env_reference is removed; block entries already expand ${NAME} — justified

[FIRST-PRINCIPLES-REVIEWED] 7bfb11e

Description read

[DESCRIPTION-READ] 6ab22c617753cbb2f78c59b606be63ff1a2dfc6f1f1d44330ff0db8f65a657d4

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 7bfb11e778065abb3f45cff2e607b151dd148d60 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 7bfb11e

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable 7bfb11e778065abb3f45cff2e607b151dd148d60 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 7bfb11e778065abb3f45cff2e607b151dd148d60 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7bfb11e

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

@iamwhatever
iamwhatever force-pushed the fix/kas-mcp-brace-resume-timeout branch from 296d203 to af22c37 Compare November 7, 2026 20:53
@iamwhatever

Copy link
Copy Markdown
Contributor Author

GPT 6.1 finding on 296d2038c8cf, src/kiro_crew/acp/kas_tool_limits.py:78 (uncapped brace product): fixed in af22c37cf007.

I checked this in the code, and it was real. kas_globs built [head + ... + branch for head in out for branch in branches] before it checked _MAX_GLOB_BRANCHES. A checkout's .kiro/settings/mcp.json reaches this through stamp_settings_mcp → _glob_disabled_tools.

The fix bounds every allocation before it happens:

  • A pattern longer than 512 characters (_MAX_GLOB_CHARS) returns None before it is parsed. This also caps the copies made by long literals and many brace groups.
  • Each group checks len(out) * len(branches) > _MAX_GLOB_BRANCHES before the product is built.

None fails closed as before: a spec server's agent is refused, and an mcp.json server is excluded whole.

New cases in test_kas_settings_mcp.py::TestBraceGlobs::test_what_kas_cannot_match_is_none:

  • your 6 × {a,b} + 150,000-branch input;
  • 100,000 single-branch groups;
  • a 513-character literal;
  • {a,b}×6 + {c,d,e}* (192 branches), refused before it is built.

@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
@iamwhatever
iamwhatever force-pushed the fix/kas-mcp-brace-resume-timeout branch from af22c37 to bf384f3 Compare November 8, 2026 02:16
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 8, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes on bf384f3 for one part. All 97 checks pass. Most of this PR is fine and should stay as it is:

  • kas_globs expands flat {a,b} groups with plain string code, so a disabledTools entry like {read,write}_* really switches those tools off on KAS. The branch and length caps are good.
  • User-declared MCP servers now stay in the agent block on session/load, as on session/new, so they keep the 120 s timeout.

What to change: the fail-closed path for a pattern KAS can't match. When kas_globs returns None (a [...] class, a \ escape, **, a nested or empty brace, or the caps), this head withholds the whole server (exclusions += [f"@{name}"] in finish_settings_mcp), or disabled_tool_exclusions puts the spec's server on unusable and the spec is refused. The user asked to turn off one tool, and this turns off the whole server or the agent. On main the server runs, so this is a new restriction, which our rule doesn't allow.

Please keep main's behaviour for such a pattern (carry the exact entries you can, run the server) and make the gap visible instead:

  • the existing logger.warning, naming the server and the pattern (through sanitize_sink_text), and
  • a notice the person sees, for example a line in the session-start notice or a bell note: "disabledTools pattern <pattern> for <server> can't be applied on KAS, so that tool stays on".

A test that a [...] pattern leaves the server running and produces the notice would pin it. With that change, I'll approve.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 8, 2026
On KAS, a disabledTools glob such as {read,write}_* matched no tool,
because KAS's excludedTools reads braces literally. Crew now expands each
flat {a,b} group into one excludedTools entry per branch. A glob KAS cannot
match exactly ([...], \, **, nested, empty or unbalanced braces, more than
64 branches) fails closed: a spec server's refuses the agent, and an
mcp.json server's excludes the server whole.

A resumed chat moved user MCP servers into the session-level array, which
has no timeout slot, so they got KAS's 60 s instead of the 120 s a new chat
gives. User servers now stay in the agent block on session/load too; KAS
launches block servers there (measured on the 0.66.33 bundle and on
0.66.91). The load-only include_user_servers / reserved_names hoist, and
the settings_server_names and _carries_env_reference helpers that only it
used, are removed.

Fixes #32598
Refs #30712
@iamwhatever
iamwhatever force-pushed the fix/kas-mcp-brace-resume-timeout branch from bf384f3 to f9fbe88 Compare November 8, 2026 07:08
@iamwhatever

Copy link
Copy Markdown
Contributor Author

@bolichen97 thanks — done on f9fbe88 (rebased onto main 1dde2fb; second commit fix(acp): keep the server running when KAS cannot match a glob).

When kas_globs returns None, nothing is withheld or refused any more:

  • finish_settings_mcp no longer adds @<server>. The glob is carried as written, as on main, beside the exact {a,b} expansions, and the server runs.
  • disabled_tool_exclusions no longer puts the server on unusable, so the spec is not refused. The only refusal left is main's: a disabledTools that is not a list of tool names.
  • kas_tool_limits.unmatched_globs_notice logs one logger.warning per pattern, naming the server and pattern through sanitize_sink_text. It also adds a session-start notice line: "⚠ disabledTools pattern <pattern> for <server> can't be applied on KAS, so that tool stays on." After eight lines, one more line names the remaining servers. The harness gathers the patterns from the spec, the global settings file (so a declared server such as kirocrew-core is covered) and the carried mcp.json servers. It skips a server KAS does not start at all.
  • Tests: test_kas_names_a_glob_it_cannot_match_and_keeps_the_server (harness: a [...] pattern, the server stays in the block, the notice is produced); test_a_file_server_glob_kas_cannot_match_keeps_it_running_with_a_notice; test_a_spec_server_glob_kas_cannot_match_keeps_the_agent_and_is_named; test_the_notice_cannot_be_forged_and_names_every_server.
  • {a,b} expansion and the 120 s resume timeout are unchanged. The acp-client.md KAS settings bullet now describes the notice.

Local: GPT and Opus local reviews. GPT found two gaps in the notice (declared servers' global globs, and the log cap), both fixed in this commit, and a verifier confirmed both closed. Opus passed, with three low notes on notice wording that I am answering here rather than with more pushes. First, a ** glob is reported even if KAS's globMatch would happen to treat it as *. Second, a spec server that is pooled could still be named. Neither changes what runs.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 8, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 8, 2026

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 7bfb11e. disabledTools rules written as {a,b} now apply on KAS, and resumed chats keep MCP's 120 s start window, with tests.

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving 7bfb11e as maintainer. All 98 checks pass. Fixes #32598. This replaces my change request on bf384f3.

The point from that review is fixed. A disabledTools glob KAS cannot match (kas_globs returns None) no longer withholds the server or refuses the spec. It is carried as written and the server still runs, as on main. unmatched_globs_notice names each pattern and its server in the session-start notice, capped at eight lines, and each one is logged as a warning. The tests pin both the spec and the settings-file cases, and that the notice can't be forged.

The parts I said were fine stay as they were: flat {a,b} expansion with plain string code, and user servers kept in the agent block on resume so they keep the 120 s timeout. I found no new regex in product code.

@bolichen97
bolichen97 merged commit 43c2489 into main Nov 8, 2026
294 of 328 checks passed
@bolichen97
bolichen97 deleted the fix/kas-mcp-brace-resume-timeout branch November 8, 2026 13:19
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 8, 2026
bolichen97 pushed a commit that referenced this pull request Nov 9, 2026
…ume (#32602)

* fix(acp): carry brace globs and the 120 s MCP start budget on KAS resume

On KAS, a disabledTools glob such as {read,write}_* matched no tool,
because KAS's excludedTools reads braces literally. Crew now expands each
flat {a,b} group into one excludedTools entry per branch. A glob KAS cannot
match exactly ([...], \, **, nested, empty or unbalanced braces, more than
64 branches) fails closed: a spec server's refuses the agent, and an
mcp.json server's excludes the server whole.

A resumed chat moved user MCP servers into the session-level array, which
has no timeout slot, so they got KAS's 60 s instead of the 120 s a new chat
gives. User servers now stay in the agent block on session/load too; KAS
launches block servers there (measured on the 0.66.33 bundle and on
0.66.91). The load-only include_user_servers / reserved_names hoist, and
the settings_server_names and _carries_env_reference helpers that only it
used, are removed.

Fixes #32598
Refs #30712

* fix(acp): keep the server running when KAS cannot match a glob

A disabledTools glob KAS has no spelling for ([...], a \ escape, **,
a nested or empty brace, or past the caps) withheld the whole
mcp.json server, and refused the agent when its own spec held one.
Both are restrictions main does not have. Such a glob is now carried
as written, as on main, and the server runs. The session-start notice
names each one, from the spec, the global settings file or an
mcp.json server, skipping a muted one, and every one is logged as a
sanitized warning. The global and spec switches now expand {a,b}
globs per branch too, so a declared server's global glob holds.

---------

Co-authored-by: Joe Guo <zejiangg@amazon.com>
(cherry picked from commit 43c2489)

Backport note: release/0.12.0's KAS harness applies with_switched_off_tools after stamp_settings_mcp (main applies it before), so harness/kas.py reads the switches once before the stamp, passes unmatched= to it, and keeps release's switch step after it. The build_kas_custom_agents call keeps release's arguments: main's forward_ssh_auth_sock comes from #32600, which is not on this base. The hoist_servers_for_session docstring keeps release's paragraph on a managed entry relaunched in the block.
bolichen97 pushed a commit that referenced this pull request Nov 9, 2026
…ume (#32602)

* fix(acp): carry brace globs and the 120 s MCP start budget on KAS resume

On KAS, a disabledTools glob such as {read,write}_* matched no tool,
because KAS's excludedTools reads braces literally. Crew now expands each
flat {a,b} group into one excludedTools entry per branch. A glob KAS cannot
match exactly ([...], \, **, nested, empty or unbalanced braces, more than
64 branches) fails closed: a spec server's refuses the agent, and an
mcp.json server's excludes the server whole.

A resumed chat moved user MCP servers into the session-level array, which
has no timeout slot, so they got KAS's 60 s instead of the 120 s a new chat
gives. User servers now stay in the agent block on session/load too; KAS
launches block servers there (measured on the 0.66.33 bundle and on
0.66.91). The load-only include_user_servers / reserved_names hoist, and
the settings_server_names and _carries_env_reference helpers that only it
used, are removed.

Fixes #32598
Refs #30712

* fix(acp): keep the server running when KAS cannot match a glob

A disabledTools glob KAS has no spelling for ([...], a \ escape, **,
a nested or empty brace, or past the caps) withheld the whole
mcp.json server, and refused the agent when its own spec held one.
Both are restrictions main does not have. Such a glob is now carried
as written, as on main, and the server runs. The session-start notice
names each one, from the spec, the global settings file or an
mcp.json server, skipping a muted one, and every one is logged as a
sanitized warning. The global and spec switches now expand {a,b}
globs per branch too, so a declared server's global glob holds.

---------

Co-authored-by: Joe Guo <zejiangg@amazon.com>
(cherry picked from commit 43c2489)

Backport note: release/0.12.0's KAS harness applies with_switched_off_tools after stamp_settings_mcp (main applies it before), so harness/kas.py reads the switches once before the stamp, passes unmatched= to it, and keeps release's switch step after it. The build_kas_custom_agents call keeps release's arguments: main's forward_ssh_auth_sock comes from #32600, which is not on this base. The hoist_servers_for_session docstring keeps release's paragraph on a managed entry relaunched in the block.
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.

KAS: brace globs in disabledTools switch nothing off, and a resumed chat gives user MCP servers 60 s

3 participants