Skip to content

fix(project-dir): treat an EPERM marker probe as absent so MCP start-up survives a masked mount - #28595

Merged
iamwhatever merged 1 commit into
mainfrom
crew/bug-resolve/26229
Nov 3, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
crew/bug-resolve/26229

Conversation

@CrysisDeu

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Managed MCP servers start normally when $HOME (or the launch directory) resolves into a mount that the sandbox masks.

On a host where $HOME is a symlink into a mount the namespace sandbox masks (for example /mnt/xyz/home/lg pointing to /xyz-servers/xyz-data/home/lg), every managed MCP server (kirocrew-core, -cron, -guide, -mate) exits at start-up, and the user sees KAS managed MCP initialization failed: kirocrew-core: failed (Connection closed). Sessions cannot be created or resumed.

Why it matters

This makes Kiro Crew unusable on any host where home directories are symlinks into a shared network mount, which is a common enterprise NFS/automount setup.

Not a goal

  • Changing the sandbox mask or what it hides. The mask stays exactly as it is.
  • Stopping the ancestor walk from entering a masked mount at all.

What changed (motivation → approach → change)

  • Symptom: PermissionError: [Errno 1] Operation not permitted: '/xyz-servers/skills' raised from detect_project_dir inside slim_server, before the server answers its first request.
  • Root cause: detect_project_dir walks up from Path.cwd().resolve() and probes each ancestor with Path.is_dir(). On Python 3.12, is_dir() returns False for a missing path, but it re-raises EPERM. Inside the sandbox, a masked ancestor answers EPERM instead of ENOENT, so the probe raises and start-up crashes.
  • Change: in src/kiro_crew/project_dir.py, probe markers through _is_dir(), which counts any OSError as "not a directory here". The walk then continues. The saved project_dir file is read under the same rule, so an unreadable saved file counts as absent. Results for every layout that can be probed are unchanged.
  • Alternative considered: skip any ancestor that is a sandbox-masked mount. It lost because it would need knowledge of the sandbox's mask list in a stdlib-only start-up module, and it still would not cover a plain EACCES ancestor outside the sandbox. The probe guard is smaller and covers both cases.

Intended? / Repro

Intended? No. Nothing in the code or history means a denied ancestor to stop start-up. The docstring at src/kiro_crew/project_dir.py:21-29 (main @ e858e5b) describes a best-effort search ("walk up from CWD", then the saved file, else None). The only commit that touched the file, 3ab3072 (#19584), moved this detection into the slim MCP entry so it would be cheap. It did not mean for the detection to fail on a denied path. The crash site is src/kiro_crew/project_dir.py:32 (all((d / m).is_dir() for m in PROJECT_MARKERS)), called from src/kiro_crew/mcp_entry.py:134.

Repro (on main @ e858e5b, Python 3.12.13, no test suite run): I wrote a standalone script that imports kiro_crew.project_dir from src/ and makes os.stat raise PermissionError(EPERM) for any path under /masked, which mimics the sandbox mask. It then points Path.cwd() at /masked/home/lg and calls detect_project_dir(lambda: Path("/nonexistent/project_dir")).

  • main: CRASH: PermissionError [Errno 1] Operation not permitted: '/masked/home/lg/skills'. The reporter's traceback ends in the same frame (project_dir.py, line 32).
  • this branch: result: None, so start-up continues.

Backwards compatibility

Compatible: every path that could be probed before gives the same answer. Only a probe that used to raise now counts as "not found".

Removes nothing: the change only turns a crash into the existing "no project dir found" result.

Tests

  • test/test_mcp_slim_entry.py::test_project_dir_walk_skips_an_ancestor_that_answers_eperm: the CWD sits under a directory whose stat answers EPERM. Detection must not raise, must fall through to the saved file, and must return None when there is no saved file.
  • test/test_mcp_slim_entry.py::test_project_dir_saved_file_that_answers_eperm_counts_as_absent: a saved project_dir file whose stat answers EPERM counts as absent (None) and does not raise.

Both tests raise PermissionError on main, because the old code calls Path.is_dir() / Path.is_file() without a guard.

Proof: not provable -- other: this host forbids local test runs; CI is the only test runner, and the standalone repro above shows the red on main

Manual verification

The standalone repro script described under Intended? / Repro: it crashes on main and returns None on this branch. Static gates black, isort and flake8 pass on both changed files.

Blind review: the adversarial-review skill could not spawn a reviewer (governance refused subagent spawn on this host), so the author ran one sequential pass in their own context (degraded mode). It checked for behavior drift vs main, remaining raise paths, sandbox weakening, and test leakage from the os.stat monkeypatch. It found nothing at Medium or worse. On Windows with Python 3.13+, Path.is_dir does not go through os.stat, so the new tests pass there without exercising the denied probe. They still exercise it on Linux and macOS.

Related Issues

Fixes #26229

Sibling sweep

Swept: git grep -nE ".is_dir() for m in" -- src/
Sibling: src/kiro_crew/doctor_checks/install.py:577 -- not affected -- probes only the configured project dir after Path(proj).is_dir() already succeeded, never masked ancestors

Pattern harvest

Rule candidate: review-prompt
Pattern: a best-effort filesystem probe on start-up (is_dir/is_file/exists on 3.12) must treat EPERM/EACCES like ENOENT, or a masked or denied path crashes the process

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality (CI runs them)
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable): N/A
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

…up survives a masked mount

detect_project_dir walked CWD ancestors with Path.is_dir(), which returns
False for a missing path but raises PermissionError on EPERM. When $HOME
symlink-resolves into a sandbox-masked mount, the masked ancestor answers
EPERM and every managed MCP server crashed before serving a request.

Probe markers and the saved project_dir file through helpers that count an
unprobeable path as absent. The sandbox mask is unchanged.

Fixes #26229
@CrysisDeu
CrysisDeu requested review from a team and KiroCrewCaptain as code owners November 2, 2026 21:55
@CrysisDeu
CrysisDeu requested a review from mbriones98 November 2, 2026 21:55
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the guard sits on the failing probe, leaves the mask unchanged, and keeps the existing "not found" result.

Notes

[DESIGN-REVIEWED] ef875f2

Description read

[DESCRIPTION-READ] 03f17334909406b1ebabbf35c648134b66e863abd61e674d4c595a9185eeaa63

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 2, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of ef875f2645c4a997db780f35d367dd87170d6a9d — 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. This is a mechanism-level fix with a linked issue (#26229) and tests that fail on base. It adds no new surface or default.

What this change ships

Inventory (3 items) — 3 justified

Intent: let managed MCP servers start when $HOME or the launch directory resolves into a masked or denied mount. FIX.

  1. When an ancestor answers EPERM or EACCES during the project-dir walk, the walk now treats it as "no checkout here" and keeps going instead of crashing at start-up — justified
  2. A saved project_dir file that cannot be read now counts as absent instead of crashing — justified
  3. Two regression tests that make os.stat fail with EPERM under a directory — justified

[FIRST-PRINCIPLES-REVIEWED] ef875f2

Description read

[DESCRIPTION-READ] 7783357218a1ab2245636a0d8b03808e6c0648f3c967328fcdd3140dcf9634fd

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 2, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision ef875f2645c4a997db780f35d367dd87170d6a9d 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 2, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ef875f2

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

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] ef875f2

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

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

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 3, 2026

@iamwhatever iamwhatever 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.

Approve at ef875f2.

The probe guard turns an EPERM/EACCES from Path.is_dir()/is_file()/read_text() into the existing "not found" result, so detection keeps walking and MCP start-up no longer crashes under a masked mount (

def _is_dir(p: Path) -> bool:
"""``p.is_dir()``, but a path that cannot be probed counts as absent.
``Path.is_dir()`` returns False for a missing path yet raises on EPERM or
EACCES. A sandbox-masked ancestor (a symlinked home that resolves into a
masked mount) answers EPERM, and detection must keep walking, not crash.
"""
try:
return p.is_dir()
except OSError:
return False
def _is_checkout(d: Path) -> bool:
return all(_is_dir(d / m) for m in PROJECT_MARKERS)
def detect_project_dir(saved_file: Callable[[], Path]) -> str | None:
"""Find the project root containing the project markers.
Search order:
1. Walk up from CWD
2. Read the saved path from ``saved_file()`` (``config_dir()/project_dir``)
*saved_file* is called only when the walk finds nothing: resolving it
creates the data home, which a found checkout must not need.
"""
cur = Path.cwd().resolve()
for d in (cur, *cur.parents):
if _is_checkout(d):
return str(d)
pdf = saved_file()
try:
if not pdf.is_file():
return None
saved = pdf.read_text(encoding="utf-8").strip()
except OSError:
return None
p = Path(saved)
if _is_dir(p) and _is_checkout(p):
return saved
return None
). Paths that could be probed before give the same answer, the sandbox mask is unchanged, and the two new tests fail on main via a monkeypatched os.stat. All checks on this head are green.

AI findings judged non-blocking:

  • Design: other start-up probes under the same mount might hit another EPERM. Out of scope; this fixes the reported crash frame, and a further failure would be a separate report.

— crew-pr-reviewer (r143)

@iamwhatever
iamwhatever merged commit 742ae56 into main Nov 3, 2026
102 of 129 checks passed
@iamwhatever
iamwhatever deleted the crew/bug-resolve/26229 branch November 3, 2026 05:37
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 3, 2026
buluoray added a commit that referenced this pull request Nov 3, 2026
Each main PR below was cherry-picked with -x in merge order, oldest
first, then squashed (PR Hygiene allows two commits).

- fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952)
  (cherry picked from commit 3a46e60)
  adapted: 0.11.0's extra-hook branch keeps its from_spec line; the
  facade shape digest is re-measured.
- fix(acp): send a KAS session the kiro-cli spelling of a stored model
  id (#25671)
  (cherry picked from commit 7df9837)
  adapted: three assertions on a pin-refusal field 0.11.0's handle
  lacks are left out of the test.
- fix(kas): start Crew's own MCP servers first so session start does not
  wait behind slow user servers (#26148)
  (cherry picked from commit 429b4f7)
  adapted: 0.11.0 names the hoist hoist_managed_servers.
- fix(acp): offer a KAS MCP sign-in only when the user names the server
  (#26481)
  (cherry picked from commit 2718088)
  adapted: the regenerate and chat-runner hunks keep 0.11.0's call
  shapes and add only this PR's lines.
- fix(kas): start env-bearing MCP servers through a local launcher
  (#26785)
  (cherry picked from commit d6bb74f)
  adapted: hoist_managed_servers name; only this PR's handle field and
  agent_specs helper; the security line budget and the leaf-only
  population pin are re-measured for the kas-mcp-launch leaf.
- fix(kas): refuse a blank kas remove --version instead of deleting
  every engine (#26623)
  (cherry picked from commit 2183c96)
- fix(kas): read allowedCommands classes, groups and quoted parens like
  kiro-cli (#28437)
  (cherry picked from commit 3fc4217)
  adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which
  does not carry the sentence this PR rewrote; security.md moves.
- fix(kas): split an authored rule's long match instead of refusing the
  block (#28510)
  (cherry picked from commit 60595c7)
  adapted: its agent-spec-fields.md sentence lands on 0.11.0's
  permissions row.
- fix(kas): carry session identity to builtin app MCP servers (#28732)
  (ported by hand from commit 8e9701f)
  adapted: 0.11.0 has no managed-entry resolution or vault identity on
  SessionExtras, so the harness returns only the app launches beside the
  payload; hoist_managed_servers takes app_launches beside resume=;
  acp-client.md drops the managed-entry sentence 0.11.0 lacks.
- fix(kas): relay a remote MCP server's headers through a local bridge
  (#28615)
  (cherry picked from commit 755c71b)
  adapted: its test calls 0.11.0's hoist_managed_servers.
- fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852)
  (cherry picked from commit 83a76fc)
- feat(kas): keep remote MCP sign-ins across sessions by default
  (#28630)
  (cherry picked from commit 00dc406)
  adapted: cli_config.py takes only the ack helper and its call sites;
  configuration.md and the decisions index take only this PR's rows; the
  decision record names the shared-crew spec, absent on 0.11, without a
  backticked path so docs-lint passes.
- fix(mcp): heal a saved absolute Windows command's PATHEXT extension
  (#25945)
  (cherry picked from commit a96eb1f)
- fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795)
  (cherry picked from commit 2af230d)
- fix(project-dir): treat an EPERM marker probe as absent so MCP
  start-up survives a masked mount (#28595)
  (cherry picked from commit 742ae56)
buluoray added a commit that referenced this pull request Nov 3, 2026
Each main PR below was cherry-picked with -x in merge order, oldest
first, then squashed (PR Hygiene allows two commits).

- fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952)
  (cherry picked from commit 3a46e60)
  adapted: 0.11.0's extra-hook branch keeps its from_spec line; the
  facade shape digest is re-measured.
- fix(acp): send a KAS session the kiro-cli spelling of a stored model
  id (#25671)
  (cherry picked from commit 7df9837)
  adapted: three assertions on a pin-refusal field 0.11.0's handle
  lacks are left out of the test.
- fix(kas): start Crew's own MCP servers first so session start does not
  wait behind slow user servers (#26148)
  (cherry picked from commit 429b4f7)
  adapted: 0.11.0 names the hoist hoist_managed_servers.
- fix(acp): offer a KAS MCP sign-in only when the user names the server
  (#26481)
  (cherry picked from commit 2718088)
  adapted: the regenerate and chat-runner hunks keep 0.11.0's call
  shapes and add only this PR's lines.
- fix(kas): start env-bearing MCP servers through a local launcher
  (#26785)
  (cherry picked from commit d6bb74f)
  adapted: hoist_managed_servers name; only this PR's handle field and
  agent_specs helper; the security line budget and the leaf-only
  population pin are re-measured for the kas-mcp-launch leaf.
- fix(kas): refuse a blank kas remove --version instead of deleting
  every engine (#26623)
  (cherry picked from commit 2183c96)
- fix(kas): read allowedCommands classes, groups and quoted parens like
  kiro-cli (#28437)
  (cherry picked from commit 3fc4217)
  adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which
  does not carry the sentence this PR rewrote; security.md moves.
- fix(kas): split an authored rule's long match instead of refusing the
  block (#28510)
  (cherry picked from commit 60595c7)
  adapted: its agent-spec-fields.md sentence lands on 0.11.0's
  permissions row.
- fix(kas): carry session identity to builtin app MCP servers (#28732)
  (ported by hand from commit 8e9701f)
  adapted: 0.11.0 has no managed-entry resolution or vault identity on
  SessionExtras, so the harness returns only the app launches beside the
  payload; hoist_managed_servers takes app_launches beside resume=;
  acp-client.md drops the managed-entry sentence 0.11.0 lacks.
- fix(kas): relay a remote MCP server's headers through a local bridge
  (#28615)
  (cherry picked from commit 755c71b)
  adapted: its test calls 0.11.0's hoist_managed_servers.
- fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852)
  (cherry picked from commit 83a76fc)
- feat(kas): keep remote MCP sign-ins across sessions by default
  (#28630)
  (cherry picked from commit 00dc406)
  adapted: cli_config.py takes only the ack helper and its call sites;
  configuration.md and the decisions index take only this PR's rows; the
  decision record names the shared-crew spec, absent on 0.11, without a
  backticked path so docs-lint passes.
- fix(mcp): heal a saved absolute Windows command's PATHEXT extension
  (#25945)
  (cherry picked from commit a96eb1f)
- fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795)
  (cherry picked from commit 2af230d)
- fix(project-dir): treat an EPERM marker probe as absent so MCP
  start-up survives a masked mount (#28595)
  (cherry picked from commit 742ae56)
- fix(kas): judge a remote-wrapper web search as its built-in (#28704)
  (cherry picked from commit 54f4e14)
  adapted: security.md gets this PR's one inserted clause on 0.11.0's
  wording of the same bullet.
buluoray added a commit that referenced this pull request Nov 3, 2026
Each main PR below was cherry-picked with -x in merge order, oldest
first, then squashed (PR Hygiene allows two commits).

- fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952)
  (cherry picked from commit 3a46e60)
  adapted: 0.11.0's extra-hook branch keeps its from_spec line; the
  facade shape digest is re-measured.
- fix(acp): send a KAS session the kiro-cli spelling of a stored model
  id (#25671)
  (cherry picked from commit 7df9837)
  adapted: three assertions on a pin-refusal field 0.11.0's handle
  lacks are left out of the test.
- fix(kas): start Crew's own MCP servers first so session start does not
  wait behind slow user servers (#26148)
  (cherry picked from commit 429b4f7)
  adapted: 0.11.0 names the hoist hoist_managed_servers.
- fix(acp): offer a KAS MCP sign-in only when the user names the server
  (#26481)
  (cherry picked from commit 2718088)
  adapted: the regenerate and chat-runner hunks keep 0.11.0's call
  shapes and add only this PR's lines.
- fix(kas): start env-bearing MCP servers through a local launcher
  (#26785)
  (cherry picked from commit d6bb74f)
  adapted: hoist_managed_servers name; only this PR's handle field and
  agent_specs helper; the security line budget and the leaf-only
  population pin are re-measured for the kas-mcp-launch leaf.
- fix(kas): refuse a blank kas remove --version instead of deleting
  every engine (#26623)
  (cherry picked from commit 2183c96)
- fix(kas): read allowedCommands classes, groups and quoted parens like
  kiro-cli (#28437)
  (cherry picked from commit 3fc4217)
  adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which
  does not carry the sentence this PR rewrote; security.md moves.
- fix(kas): split an authored rule's long match instead of refusing the
  block (#28510)
  (cherry picked from commit 60595c7)
  adapted: its agent-spec-fields.md sentence lands on 0.11.0's
  permissions row.
- fix(kas): carry session identity to builtin app MCP servers (#28732)
  (ported by hand from commit 8e9701f)
  adapted: 0.11.0 has no managed-entry resolution or vault identity on
  SessionExtras, so the harness returns only the app launches beside the
  payload; hoist_managed_servers takes app_launches beside resume=;
  acp-client.md drops the managed-entry sentence 0.11.0 lacks.
- fix(kas): relay a remote MCP server's headers through a local bridge
  (#28615)
  (cherry picked from commit 755c71b)
  adapted: its test calls 0.11.0's hoist_managed_servers.
- fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852)
  (cherry picked from commit 83a76fc)
- feat(kas): keep remote MCP sign-ins across sessions by default
  (#28630)
  (cherry picked from commit 00dc406)
  adapted: cli_config.py takes only the ack helper and its call sites;
  configuration.md and the decisions index take only this PR's rows; the
  decision record names the shared-crew spec, absent on 0.11, without a
  backticked path so docs-lint passes.
- fix(mcp): heal a saved absolute Windows command's PATHEXT extension
  (#25945)
  (cherry picked from commit a96eb1f)
- fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795)
  (cherry picked from commit 2af230d)
- fix(project-dir): treat an EPERM marker probe as absent so MCP
  start-up survives a masked mount (#28595)
  (cherry picked from commit 742ae56)
- fix(kas): judge a remote-wrapper web search as its built-in (#28704)
  (cherry picked from commit 54f4e14)
  adapted: security.md gets this PR's one inserted clause on 0.11.0's
  wording of the same bullet.
- fix(dashboard): give every MCP handler error a stable code (#26661)
  (cherry picked from commit 14bd1a5)
  adapted: error-code-baseline.json regenerated with its generator on
  0.11.0's tree (the same mcp.py entry drops as on main).
- fix(mcp): refuse to replace an unparseable global mcp.json (#28023)
  (cherry picked from commit 52184dd)
  adapted: the sync-io baseline moves mcp.py 8 -> 6 as on main;
  learn-cron-dashboard.md gets this PR's inserted sentence on 0.11.0's
  wording; test_lenient_read_rewrite_ratchet.py, absent on 0.11.0,
  stays absent.
buluoray added a commit that referenced this pull request Nov 3, 2026
Each main PR below was cherry-picked with -x in merge order, oldest
first, then squashed (PR Hygiene allows two commits).

- fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952)
  (cherry picked from commit 3a46e60)
  adapted: 0.11.0's extra-hook branch keeps its from_spec line; the
  facade shape digest is re-measured.
- fix(acp): send a KAS session the kiro-cli spelling of a stored model
  id (#25671)
  (cherry picked from commit 7df9837)
  adapted: three assertions on a pin-refusal field 0.11.0's handle
  lacks are left out of the test.
- fix(kas): start Crew's own MCP servers first so session start does not
  wait behind slow user servers (#26148)
  (cherry picked from commit 429b4f7)
  adapted: 0.11.0 names the hoist hoist_managed_servers.
- fix(acp): offer a KAS MCP sign-in only when the user names the server
  (#26481)
  (cherry picked from commit 2718088)
  adapted: the regenerate and chat-runner hunks keep 0.11.0's call
  shapes and add only this PR's lines.
- fix(kas): start env-bearing MCP servers through a local launcher
  (#26785)
  (cherry picked from commit d6bb74f)
  adapted: hoist_managed_servers name; only this PR's handle field and
  agent_specs helper; the security line budget and the leaf-only
  population pin are re-measured for the kas-mcp-launch leaf.
- fix(kas): refuse a blank kas remove --version instead of deleting
  every engine (#26623)
  (cherry picked from commit 2183c96)
- fix(kas): read allowedCommands classes, groups and quoted parens like
  kiro-cli (#28437)
  (cherry picked from commit 3fc4217)
  adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which
  does not carry the sentence this PR rewrote; security.md moves.
- fix(kas): split an authored rule's long match instead of refusing the
  block (#28510)
  (cherry picked from commit 60595c7)
  adapted: its agent-spec-fields.md sentence lands on 0.11.0's
  permissions row.
- fix(kas): carry session identity to builtin app MCP servers (#28732)
  (ported by hand from commit 8e9701f)
  adapted: 0.11.0 has no managed-entry resolution or vault identity on
  SessionExtras, so the harness returns only the app launches beside the
  payload; hoist_managed_servers takes app_launches beside resume=;
  acp-client.md drops the managed-entry sentence 0.11.0 lacks.
- fix(kas): relay a remote MCP server's headers through a local bridge
  (#28615)
  (cherry picked from commit 755c71b)
  adapted: its test calls 0.11.0's hoist_managed_servers.
- fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852)
  (cherry picked from commit 83a76fc)
- feat(kas): keep remote MCP sign-ins across sessions by default
  (#28630)
  (cherry picked from commit 00dc406)
  adapted: cli_config.py takes only the ack helper and its call sites;
  configuration.md and the decisions index take only this PR's rows; the
  decision record names the shared-crew spec, absent on 0.11, without a
  backticked path so docs-lint passes.
- fix(mcp): heal a saved absolute Windows command's PATHEXT extension
  (#25945)
  (cherry picked from commit a96eb1f)
- fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795)
  (cherry picked from commit 2af230d)
- fix(project-dir): treat an EPERM marker probe as absent so MCP
  start-up survives a masked mount (#28595)
  (cherry picked from commit 742ae56)
- fix(kas): judge a remote-wrapper web search as its built-in (#28704)
  (cherry picked from commit 54f4e14)
  adapted: security.md gets this PR's one inserted clause on 0.11.0's
  wording of the same bullet.
- fix(dashboard): give every MCP handler error a stable code (#26661)
  (cherry picked from commit 14bd1a5)
  adapted: error-code-baseline.json regenerated with its generator on
  0.11.0's tree (the same mcp.py entry drops as on main).
- fix(mcp): refuse to replace an unparseable global mcp.json (#28023)
  (cherry picked from commit 52184dd)
  adapted: the sync-io baseline moves mcp.py 8 -> 6 as on main;
  learn-cron-dashboard.md gets this PR's inserted sentence on 0.11.0's
  wording; test_lenient_read_rewrite_ratchet.py, absent on 0.11.0,
  stays absent.

- fix(acp): remove a new KAS session's app launch snapshots at shutdown
  (#28954)
  (cherry picked from commit 1217a85)
  adapted: only this PR's launch_snapshots lines (request_identity is
  another PR's); 0.11.0's hoist_managed_servers name; the two
  test_runtime_bindings signature digests re-measured.
chenmingwei23 pushed a commit that referenced this pull request Nov 3, 2026
…28835)

Each main PR below was cherry-picked with -x in merge order, oldest
first, then squashed (PR Hygiene allows two commits).

- fix(hooks): give KAS-run agent spec hooks KIRO_SESSION_ID (#24952)
  (cherry picked from commit 3a46e60)
  adapted: 0.11.0's extra-hook branch keeps its from_spec line; the
  facade shape digest is re-measured.
- fix(acp): send a KAS session the kiro-cli spelling of a stored model
  id (#25671)
  (cherry picked from commit 7df9837)
  adapted: three assertions on a pin-refusal field 0.11.0's handle
  lacks are left out of the test.
- fix(kas): start Crew's own MCP servers first so session start does not
  wait behind slow user servers (#26148)
  (cherry picked from commit 429b4f7)
  adapted: 0.11.0 names the hoist hoist_managed_servers.
- fix(acp): offer a KAS MCP sign-in only when the user names the server
  (#26481)
  (cherry picked from commit 2718088)
  adapted: the regenerate and chat-runner hunks keep 0.11.0's call
  shapes and add only this PR's lines.
- fix(kas): start env-bearing MCP servers through a local launcher
  (#26785)
  (cherry picked from commit d6bb74f)
  adapted: hoist_managed_servers name; only this PR's handle field and
  agent_specs helper; the security line budget and the leaf-only
  population pin are re-measured for the kas-mcp-launch leaf.
- fix(kas): refuse a blank kas remove --version instead of deleting
  every engine (#26623)
  (cherry picked from commit 2183c96)
- fix(kas): read allowedCommands classes, groups and quoted parens like
  kiro-cli (#28437)
  (cherry picked from commit 3fc4217)
  adapted: agent-spec-fields.md keeps 0.11.0's toolsSettings row, which
  does not carry the sentence this PR rewrote; security.md moves.
- fix(kas): split an authored rule's long match instead of refusing the
  block (#28510)
  (cherry picked from commit 60595c7)
  adapted: its agent-spec-fields.md sentence lands on 0.11.0's
  permissions row.
- fix(kas): carry session identity to builtin app MCP servers (#28732)
  (ported by hand from commit 8e9701f)
  adapted: 0.11.0 has no managed-entry resolution or vault identity on
  SessionExtras, so the harness returns only the app launches beside the
  payload; hoist_managed_servers takes app_launches beside resume=;
  acp-client.md drops the managed-entry sentence 0.11.0 lacks.
- fix(kas): relay a remote MCP server's headers through a local bridge
  (#28615)
  (cherry picked from commit 755c71b)
  adapted: its test calls 0.11.0's hoist_managed_servers.
- fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852)
  (cherry picked from commit 83a76fc)
- feat(kas): keep remote MCP sign-ins across sessions by default
  (#28630)
  (cherry picked from commit 00dc406)
  adapted: cli_config.py takes only the ack helper and its call sites;
  configuration.md and the decisions index take only this PR's rows; the
  decision record names the shared-crew spec, absent on 0.11, without a
  backticked path so docs-lint passes.
- fix(mcp): heal a saved absolute Windows command's PATHEXT extension
  (#25945)
  (cherry picked from commit a96eb1f)
- fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON (#28795)
  (cherry picked from commit 2af230d)
- fix(project-dir): treat an EPERM marker probe as absent so MCP
  start-up survives a masked mount (#28595)
  (cherry picked from commit 742ae56)
- fix(kas): judge a remote-wrapper web search as its built-in (#28704)
  (cherry picked from commit 54f4e14)
  adapted: security.md gets this PR's one inserted clause on 0.11.0's
  wording of the same bullet.
- fix(dashboard): give every MCP handler error a stable code (#26661)
  (cherry picked from commit 14bd1a5)
  adapted: error-code-baseline.json regenerated with its generator on
  0.11.0's tree (the same mcp.py entry drops as on main).
- fix(mcp): refuse to replace an unparseable global mcp.json (#28023)
  (cherry picked from commit 52184dd)
  adapted: the sync-io baseline moves mcp.py 8 -> 6 as on main;
  learn-cron-dashboard.md gets this PR's inserted sentence on 0.11.0's
  wording; test_lenient_read_rewrite_ratchet.py, absent on 0.11.0,
  stays absent.

- fix(acp): remove a new KAS session's app launch snapshots at shutdown
  (#28954)
  (cherry picked from commit 1217a85)
  adapted: only this PR's launch_snapshots lines (request_identity is
  another PR's); 0.11.0's hoist_managed_servers name; the two
  test_runtime_bindings signature digests re-measured.
buluoray added a commit that referenced this pull request Nov 3, 2026
Every main PR the 0.11.2 backport carried that release/0.12.0 still
lacks, plus #28925, cherry-picked with -x in main merge order, oldest
first, then squashed (PR Hygiene allows two commits). Each pick's
added and removed lines match its main commit except where noted.

- fix(mcp): refuse to replace an unparseable global mcp.json (#28023)
  (cherry picked from commit 52184dd)
  conflict in surrounding lines only; the changed lines are main's.
- fix(kas): read allowedCommands classes, groups and quoted parens like
  kiro-cli (#28437)
  (cherry picked from commit 3fc4217)
  conflict in surrounding lines only; the changed lines are main's.
- feat(dashboard): answer /context, /usage, /help and /agent locally on
  KAS (#26681)
  (cherry picked from commit 84ea89d)
- fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON
  (#28795)
  (cherry picked from commit 2af230d)
- fix(kas): split an authored rule's long match instead of refusing the
  block (#28510)
  (cherry picked from commit 60595c7)
- fix(kas): carry session identity to builtin app MCP servers (#28732)
  (cherry picked from commit 8e9701f)
- fix(kas): relay a remote MCP server's headers through a local bridge
  (#28615)
  (cherry picked from commit 755c71b)
- fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852)
  (cherry picked from commit 83a76fc)
- feat(kas): keep remote MCP sign-ins across sessions by default
  (#28630)
  (cherry picked from commit 00dc406)
  conflict in surrounding lines only: docs/decisions/README.md and
  configuration.md lack neighbouring rows 0.12.0 does not carry.
- fix(project-dir): treat an EPERM marker probe as absent so MCP
  start-up survives a masked mount (#28595)
  (cherry picked from commit 742ae56)
- fix(kas): judge a remote-wrapper web search as its built-in (#28704)
  (cherry picked from commit 54f4e14)
- fix(acp): remove a new KAS session's app launch snapshots at shutdown
  (#28954)
  (cherry picked from commit 1217a85)
- fix: run spec hook commands longer than 4096 characters on kas
  (#28925)
  (cherry picked from commit 0fe72d6)
  adapted: agent-host-contract.md gets main's inserted sentence in
  0.12.0's paragraph, which lacks main's later user-hook-files text.
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.

Managed MCP servers crash ("Connection closed") when $HOME symlink-resolves into a sandbox-masked mount (detect_project_dir EPERM)

2 participants