Skip to content

fix(bin): refuse Kimi launch when the directory declares project MCP servers - #6741

Open
tiago-peixoto wants to merge 8 commits into
kunchenguid:mainfrom
tiago-peixoto:fm/upstream-5226
Open

tiago-peixoto wants to merge 8 commits into
kunchenguid:mainfrom
tiago-peixoto:fm/upstream-5226

Conversation

@tiago-peixoto

@tiago-peixoto tiago-peixoto commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Refs #5226.

Contribute the corrective part of #5226, which the maintainer scoped on the issue as a restore that can land on its own: stop pressing Enter on a Kimi workspace trust dialog that lists project MCP targets, and refuse the launch with a clear reason when the directory declares project MCP servers. Directories with no project MCP servers still get past the folder prompt, and kimi -p keeps skipping untrusted project servers.

This does not close the issue. A directory that declares project MCP servers still cannot reach the Kimi composer after this change; an operator-consent design for that is a separate, later, opt-in contribution that the maintainer said would be reviewed on its own.

No fix may start project MCP stdio or HTTP targets without an explicit consent decision that covers those targets. Tests use an isolated KIMI_CODE_HOME.

What Changed

  • bin/fm-spawn.sh now reads .kimi-code/mcp.json and the root .mcp.json before starting Kimi and refuses the launch with a named reason when either declares a project MCP server (including one with enabled: false) or cannot be proven empty (unreadable, not a regular file, malformed JSON, a non-object mcpServers, or no jq on the host). A missing file, a missing mcpServers key, or an empty server map still launches, and the interactive launch stays kimi --auto.
  • bin/fm-kimi-trust-lib.sh also treats a Project MCP targets: header (the wording Kimi 2.1.1 and 0.43.1 use) as an announcing prompt, so the readiness loop sends no Enter on it; the not-ready diagnostic for a clipped dialog now states that no key was sent.
  • tests/fm-kimi-harness.test.sh adds twelve cases covering each refusal cause, the two still-launching cases, and the un-answered listed-targets dialogs, all under an isolated KIMI_CODE_HOME with an assertion that no launch wrote to the ambient home; the Kimi adapter reference and docs/configuration.md describe the refusal and its backstop.

Risk Assessment

✅ Low: The change adds one bounded pre-launch read that fails closed on every unprovable shape, one additional pane pattern for the recorded 2.1.1 and 0.43.1 target list, and behavior-driven tests through the spawn's executable interface; I traced the declared, disabled, malformed, unreadable, non-object, root .mcp.json, empty-map, and no-file inputs through kimi_project_mcp_file_blocks_launch and found no path that lets a declaring directory reach Enter, the merged 2.3.0 tests do not publish declarations so the new read does not pre-empt them, and the only findings are test-quality and placement notes.

Testing

Ran the portable Kimi harness suite (48 ok, exit 0, with real interpreter dirs ahead of mise shims) against a fake kimi binary, so its disabled/unreadable/directory/undocumented-shape/empty-map branches are recorded as not live. Built a disposable lab (bin/fm-lab-home.sh, private tmux socket, fixture projects with bare origins, pinned Kimi 2.3.1 verified against the vendor manifest sha256) and drove real fm-spawn.sh on the tmux backend: declared .kimi-code/mcp.json, root .mcp.json, and malformed JSON were all refused before Kimi started with the expected reason in state/<id>.status and the pane transcript showing no kimi command; the plain directory launched real Kimi, whose 2.3.1 folder prompt was captured, answered, cleared, and the brief pointer typed and submitted (trust record and user-history in the lab home confirm it), after which delivery confirmation failed only because no Kimi model/login exists in the lab. Ran tests/fm-kimi-trust-prompt-live-e2e.test.sh against the real binary (all ok: plain prompt cleared by Enter, root and .kimi-code declarations announced and never answered, marker command never ran, short/paged panes refused). Ran real kimi -p in a declaring directory: Kimi printed it skipped the untrusted project server and the marker never ran. Isolation checks: real ~/.kimi-code absent, no lab projects in real ~/.treehouse, no lab windows on the default tmux server. Lab, Kimi prefix, and spawn temp dirs removed; worktree clean. No UI screenshot: the surface is a terminal TUI, captured as pane transcripts/frames.

  • Live validation: ✅ go - 6 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Spawn a Kimi crewmate into a worktree whose .kimi-code/mcp.json declares a project MCP server: the launch is refused before Kimi starts, the status file names the declaration and the consent reason, a… ✅ pass live real-spawn-declared-kimi-code-mcp-json.txt: 'failed: refusing Kimi launch: .kimi-code/mcp.json in this directory declares project MCP servers...' in state/kd1.status, pane shows only treehouse get and…
Spawn into a worktree whose root .mcp.json (undocumented location Kimi 2.3.x honors) declares a project MCP server: refused before launch naming .mcp.json ✅ pass live real-spawn-root-mcp-json.txt: status 'refusing Kimi launch: .mcp.json in this directory declares project MCP servers', no kimi command in pane, marker.log empty
Adversarial: a .kimi-code/mcp.json that is not valid JSON cannot be proven empty, so the launch is refused with the 'could not be read' reason instead of proceeding ✅ pass live real-spawn-malformed-kimi-code-mcp-json.txt: status 'refusing Kimi launch: .kimi-code/mcp.json in this directory could not be read. Firstmate cannot prove it declares no project MCP servers, so Kimi w…
Spawn into a directory with no project MCP servers: real Kimi 2.3.1 shows its folder prompt, Firstmate recognizes and answers it, the prompt clears into the composer, and the brief pointer is typed an… ✅ pass live real-spawn-plain-dir-frames.txt frames 7-9 and real-spawn-plain-dir.txt: workspace-trust record for the worktree written at Enter time, user-history shows 'Read the brief at .../launch-brief.md and fo…
Plain-directory spawn completes brief delivery confirmation (✨ echo or nonzero context) after the prompt is answered ⏸️ untested no Kimi cannot open a session without a configured model or login. The lab home has neither, Kimi Code CLI is not installed on this host, and the runbook forbids signing in or using a real credential sto…
Adversarial backstop: real Kimi 2.3.1 folder prompts that announce declared servers (root .mcp.json and .kimi-code/mcp.json) are recognized as announcing and never receive Enter, while the plain promp… ✅ pass live live-kimi-2.3.1-trust-prompt-guard.txt: all 5 ok lines from tests/fm-kimi-trust-prompt-live-e2e.test.sh with the pinned 2.3.1 binary, exit=0
Disabled (enabled:false), unreadable, directory-in-place, undocumented-shape, and empty-map declarations take the expected refuse/launch branches, with an isolated KIMI_CODE_HOME and a falsifiable mar… ⏸️ untested no These branches were exercised only by tests/fm-kimi-harness.test.sh against a fake kimi binary (48 ok, portable-kimi-harness-suite.txt), which is a unit-style stub run and not the live product. No rea…
kimi -p in a directory declaring a project MCP server keeps skipping the untrusted project server and does not start it ✅ pass live real-kimi-2.3.1-print-mode-declared-dir.txt: 'Warning: this folder is not trusted; skipped 1 project-level MCP server: lab-marker' and marker-p.log empty
Evidence: Real spawn refused: .kimi-code/mcp.json declares project MCP servers

Source: Real spawn refused: .kimi-code/mcp.json declares project MCP servers

fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.xcB3QD
warning: /tmp/fm-lab.xcB3QD/data/kd1/launch-brief.md records no ship branch; defaulting to legacy branch fm/kd1
warning: /tmp/fm-lab.xcB3QD/data/kd1/launch-brief.md records no delivery contract line (scaffolded before ship briefs recorded one); launching on the explicit --mode local-only - confirm its definition of done matches
notice: kd1 ships mode=local-only while the standing posture for proj-declared is no-mistakes - less rigor than the captain's standing posture; proceed only on a current explicit captain instruction or an intake judgment you can state
error: refusing Kimi launch: .kimi-code/mcp.json in this directory declares project MCP servers. Firstmate will not start Kimi, because answering the folder prompt can start those targets without a consent decision that covers them. Remove the project servers from that file, or wait for a later consent design. This directory cannot use Kimi until then.; inspect window firstmate:fm-kd1
warning: leaving task kd1's slot claim on /tmp/fm-lab.xcB3QD/home/.treehouse/proj-declared-a71965/1/proj-declared in place; the Treehouse project lock is no longer held, so the next spawn's claim replaces it
spawn-exit=1
failed [at=1792853998]: refusing Kimi launch: .kimi-code/mcp.json in this directory declares project MCP servers. Firstmate will not start Kimi, because answering the folder prompt can start those targets without a consent decision that covers them. Remove the project servers from that file, or wait for a later consent design. This directory cannot use Kimi until then.
treehouse get
firstmate@firstmate-hz:/tmp/fm-lab.xcB3QD/proj-declared$ treehouse get
A new version of treehouse is available: v2.3.0 → v3.1.5
Run "treehouse update" to update
🌳 Setting up worktree...
🌳 Entered worktree at ~/.treehouse/proj-declared-a71965/1/proj-declared. Type 'exit' to return.
firstmate@firstmate-hz:~/.treehouse/proj-declared-a71965/1/proj-declared$ cd -- '/tmp/fm-lab.xcB3QD/home/.treehouse/proj-declared-a71965/1/proj-declared'
firstmate@firstmate-hz:~/.treehouse/proj-declared-a71965/1/proj-declared$ export GOTMPDIR=/tmp/fm-kd1/gotmp
firstmate@firstmate-hz:~/.treehouse/proj-declared-a71965/1/proj-declared$ export COMPACT_ADVISER_DISABLE=1
firstmate@firstmate-hz:~/.treehouse/proj-declared-a71965/1/proj-declared$ export FM_TASK_ID=kd1
firstmate@firstmate-hz:~/.treehouse/proj-declared-a71965/1/proj-declared$
Evidence: Real spawn refused: root .mcp.json declares project MCP servers

Source: Real spawn refused: root .mcp.json declares project MCP servers

# Real bin/fm-spawn.sh run (tmux backend) in a disposable lab home against Kimi Code CLI 2.3.1 from a pinned, checksum-verified download. Filtered: launch-brief/posture warnings.
=== spawn kr1 (root-mcp-json)
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.xcB3QD
error: refusing Kimi launch: .mcp.json in this directory declares project MCP servers. Firstmate will not start Kimi, because answering the folder prompt can start those targets without a consent decision that covers them. Remove the project servers from that file, or wait for a later consent design. This directory cannot use Kimi until then.; inspect window firstmate:fm-kr1
warning: leaving task kr1's slot claim on /tmp/fm-lab.xcB3QD/home/.treehouse/proj-rootmcp-3174ee/1/proj-rootmcp in place; the Treehouse project lock is no longer held, so the next spawn's claim replaces it
spawn-exit=1
=== status file
failed [at=1792854035]: refusing Kimi launch: .mcp.json in this directory declares project MCP servers. Firstmate will not start Kimi, because answering the folder prompt can start those targets without a consent decision that covers them. Remove the project servers from that file, or wait for a later consent design. This directory cannot use Kimi until then.
=== pane (visible viewport)
treehouse get
firstmate@firstmate-hz:/tmp/fm-lab.xcB3QD/proj-rootmcp$ treehouse get
A new version of treehouse is available: v2.3.0 → v3.1.5
Run "treehouse update" to update
🌳 Setting up worktree...
🌳 Entered worktree at ~/.treehouse/proj-rootmcp-3174ee/1/proj-rootmcp. Type 'exit' to return.
firstmate@firstmate-hz:~/.treehouse/proj-rootmcp-3174ee/1/proj-rootmcp$ cd -- '/tmp/fm-lab.xcB3QD/home/.treehouse/proj-rootmcp-3174ee/1/proj-rootmcp'
firstmate@firstmate-hz:~/.treehouse/proj-rootmcp-3174ee/1/proj-rootmcp$ export GOTMPDIR=/tmp/fm-kr1/gotmp
firstmate@firstmate-hz:~/.treehouse/proj-rootmcp-3174ee/1/proj-rootmcp$ export COMPACT_ADVISER_DISABLE=1
firstmate@firstmate-hz:~/.treehouse/proj-rootmcp-3174ee/1/proj-rootmcp$ export FM_TASK_ID=kr1
firstmate@firstmate-hz:~/.treehouse/proj-rootmcp-3174ee/1/proj-rootmcp$
=== kimi processes
=== marker.log
(end marker)
Evidence: Real spawn refused: malformed .kimi-code/mcp.json could not be read

Source: Real spawn refused: malformed .kimi-code/mcp.json could not be read

# Real bin/fm-spawn.sh run (tmux backend) in a disposable lab home against Kimi Code CLI 2.3.1 from a pinned, checksum-verified download. Filtered: launch-brief/posture warnings.
# Note: the PIDs under '=== kimi processes' belong to tests/fm-kimi-trust-prompt-live-e2e.test.sh, which ran concurrently on its own socket (fm-kimi-trust-*); the fm-km1 pane itself shows no kimi command was ever run.
=== spawn km1 (malformed-kimi-code-mcp-json)
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.xcB3QD
error: refusing Kimi launch: .kimi-code/mcp.json in this directory could not be read. Firstmate cannot prove it declares no project MCP servers, so Kimi was not started. Fix or remove that file, or wait for a later consent design.; inspect window firstmate:fm-km1
warning: leaving task km1's slot claim on /tmp/fm-lab.xcB3QD/home/.treehouse/proj-malformed-09f5b0/1/proj-malformed in place; the Treehouse project lock is no longer held, so the next spawn's claim replaces it
spawn-exit=1
=== status file
failed [at=1792854040]: refusing Kimi launch: .kimi-code/mcp.json in this directory could not be read. Firstmate cannot prove it declares no project MCP servers, so Kimi was not started. Fix or remove that file, or wait for a later consent design.
=== pane (visible viewport)
treehouse get
firstmate@firstmate-hz:/tmp/fm-lab.xcB3QD/proj-malformed$ treehouse get
A new version of treehouse is available: v2.3.0 → v3.1.5
Run "treehouse update" to update
🌳 Setting up worktree...
🌳 Entered worktree at ~/.treehouse/proj-malformed-09f5b0/1/proj-malformed. Type 'exit' to return.
firstmate@firstmate-hz:~/.treehouse/proj-malformed-09f5b0/1/proj-malformed$ cd -- '/tmp/fm-lab.xcB3QD/home/.treehouse/proj-malformed-09f5b0/1/proj-malformed'
firstmate@firstmate-hz:~/.treehouse/proj-malformed-09f5b0/1/proj-malformed$ export GOTMPDIR=/tmp/fm-km1/gotmp
firstmate@firstmate-hz:~/.treehouse/proj-malformed-09f5b0/1/proj-malformed$ export COMPACT_ADVISER_DISABLE=1
firstmate@firstmate-hz:~/.treehouse/proj-malformed-09f5b0/1/proj-malformed$ export FM_TASK_ID=km1
firstmate@firstmate-hz:~/.treehouse/proj-malformed-09f5b0/1/proj-malformed$
=== kimi processes
2312597 /usr/bin/tmux -L fm-kimi-trust-2311345 new-session -d -s plain -x 120 -y 40 -c /tmp/fm-kimi-trust.9l49SQ/plain -- env -u KIMI_CODE_TRUST_WORKSPACE HOME=/tmp/fm-kimi-trust.9l49SQ/home-plain KIMI_CODE_HOME=/tmp/fm-kimi-trust.9l49SQ/home-plain/.kimi-code KIMI_CODE_NO_AUTO_UPDATE=1 /tmp/fm-kimi-bin.xswwiB/prefix/bin/kimi --auto
2317104 /tmp/fm-kimi-bin.xswwiB/prefix/bin/kimi --auto
=== marker.log
(end marker)
Evidence: Real spawn, plain directory: Kimi 2.3.1 prompt answered, trust record and submitted brief pointer

Source: Real spawn, plain directory: Kimi 2.3.1 prompt answered, trust record and submitted brief pointer

# Real bin/fm-spawn.sh run (tmux backend) in a disposable lab home against Kimi Code CLI 2.3.1 from a pinned, checksum-verified download. Filtered: launch-brief/posture warnings.
# The lab home has no Kimi login and no real model, so Kimi cannot open a session after the brief pointer is submitted; delivery confirmation therefore fails. The folder prompt handling is in real-spawn-plain-dir-frames.txt (frame 7 = Kimi 2.3.1 prompt, frame 8 = cleared composer, frame 9 = brief pointer typed).
=== spawn kp1 (plain-dir)
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.xcB3QD
error: kimi brief pointer delivery was not confirmed; inspect window firstmate:fm-kp1
warning: leaving task kp1's slot claim on /tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain in place; the Treehouse project lock is no longer held, so the next spawn's claim replaces it
spawn-exit=1
=== status file
failed [at=1792854076]: kimi brief pointer delivery was not confirmed
=== pane (visible viewport)
treehouse get
firstmate@firstmate-hz:/tmp/fm-lab.xcB3QD/proj-plain$ treehouse get
A new version of treehouse is available: v2.3.0 → v3.1.5
Run "treehouse update" to update
🌳 Setting up worktree...
🌳 Entered worktree at ~/.treehouse/proj-plain-6d2877/1/proj-plain. Type 'exit' to return.
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ cd -- '/tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain'
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export GOTMPDIR=/tmp/fm-kp1/gotmp
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export COMPACT_ADVISER_DISABLE=1
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export FM_TASK_ID=kp1
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ . '/tmp/fm-kp1+ed5198cd00e35844b3782356ce2394df287a2e8a0c1c65d64e018e659f2acda0/launch.s1792
854044.2317403.21124.sh'
 ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
 │                                                                                                                                                            │
 │  ▐█▛█▛█▌  Welcome to Kimi Code!                                                                                                                            │
 │  ▐█████▌  Send /help for help information.                                                                                                                 │
 │                                                                                                                                                            │
 │  Directory: /tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain                                                                              │
 │  Session:                                                                                                                                                  │
 │  Model:     test                                                                                                                                           │
 │  Version:   2.3.1                                                                                                                                          │
 │                                                                                                                                                            │
 ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
 ✦ Kimi K3.1 Pro is ready - use the model in a fresh session for the best results
   Standard: Plus/Moderato and above; Highspeed: Pro/Allegretto and above
   No session yet — one will be created on your first message.
   tmux extended-keys is off. Modified Enter keys may not work. Add `set -g extended-keys on` to ~/.tmux.conf and restart tmux.
   Error: Failed to start a session: Model "test" is not configured in config.toml.
 ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
 │ >                                                                                                                                                          │
 ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
 Never Ask  test  …/proj-plain-6d2877/1/proj-plain                                                                                    /init: generate AGENTS.md
                                                                                                                                                    context: 0%
=== kimi processes
=== marker.log
(end marker)

=== lab Kimi home trust record written when Firstmate answered the prompt (lab home only; real ~/.kimi-code does not exist)
wd_proj-plain_8fa726cf3f7a
{"root":"/tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain","trustedAt":1792854047019}
=== Kimi user-history (what was submitted into the composer)
{"content":"Read the brief at /tmp/fm-lab.xcB3QD/data/kp1/launch-brief.md and follow it exactly."}
Evidence: Plain directory viewport frames (frame 7 prompt, frame 8 cleared composer, frame 9 brief pointer)

Source: Plain directory viewport frames (frame 7 prompt, frame 8 cleared composer, frame 9 brief pointer)

##### frame 3 (t=3s)
treehouse get
firstmate@firstmate-hz:/tmp/fm-lab.xcB3QD/proj-plain$ treehouse get
A new version of treehouse is available: v2.3.0 → v3.1.5
Run "treehouse update" to update
🌳 Setting up worktree...
🌳 Entered worktree at ~/.treehouse/proj-plain-6d2877/1/proj-plain. Type 'exit' to return.
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$
##### frame 5 (t=5s)
treehouse get
firstmate@firstmate-hz:/tmp/fm-lab.xcB3QD/proj-plain$ treehouse get
A new version of treehouse is available: v2.3.0 → v3.1.5
Run "treehouse update" to update
🌳 Setting up worktree...
🌳 Entered worktree at ~/.treehouse/proj-plain-6d2877/1/proj-plain. Type 'exit' to return.
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ cd -- '/tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain'
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$
##### frame 6 (t=6s)
treehouse get
firstmate@firstmate-hz:/tmp/fm-lab.xcB3QD/proj-plain$ treehouse get
A new version of treehouse is available: v2.3.0 → v3.1.5
Run "treehouse update" to update
🌳 Setting up worktree...
🌳 Entered worktree at ~/.treehouse/proj-plain-6d2877/1/proj-plain. Type 'exit' to return.
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ cd -- '/tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain'
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export GOTMPDIR=/tmp/fm-kp1/gotmp
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export COMPACT_ADVISER_DISABLE=1
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export FM_TASK_ID=kp1
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ . '/tmp/fm-kp1+ed5198cd00e35844b3782356ce2394df287a2e8a0c1c65d64e018e659f2acda0/launch.s1792
854044.2317403.21124.sh'
##### frame 7 (t=7s)
treehouse get
firstmate@firstmate-hz:/tmp/fm-lab.xcB3QD/proj-plain$ treehouse get
A new version of treehouse is available: v2.3.0 → v3.1.5
Run "treehouse update" to update
🌳 Setting up worktree...
🌳 Entered worktree at ~/.treehouse/proj-plain-6d2877/1/proj-plain. Type 'exit' to return.
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ cd -- '/tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain'
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export GOTMPDIR=/tmp/fm-kp1/gotmp
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export COMPACT_ADVISER_DISABLE=1
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export FM_TASK_ID=kp1
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ . '/tmp/fm-kp1+ed5198cd00e35844b3782356ce2394df287a2e8a0c1c65d64e018e659f2acda0/launch.s1792
854044.2317403.21124.sh'
 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Trust this folder?
  ↑↓ navigate · Enter select · Esc exit
  /tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain
  No project integrations or instructions to activate.
  Trust is remembered for this folder, including future project config changes.
  Tool approvals follow your permission settings.
   ❯ Trust and continue
     Exit
 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
##### frame 8 (t=8s)
treehouse get
firstmate@firstmate-hz:/tmp/fm-lab.xcB3QD/proj-plain$ treehouse get
A new version of treehouse is available: v2.3.0 → v3.1.5
Run "treehouse update" to update
🌳 Setting up worktree...
🌳 Entered worktree at ~/.treehouse/proj-plain-6d2877/1/proj-plain. Type 'exit' to return.
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ cd -- '/tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain'
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export GOTMPDIR=/tmp/fm-kp1/gotmp
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export COMPACT_ADVISER_DISABLE=1
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export FM_TASK_ID=kp1
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ . '/tmp/fm-kp1+ed5198cd00e35844b3782356ce2394df287a2e8a0c1c65d64e018e659f2acda0/launch.s1792
854044.2317403.21124.sh'
 ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
 │                                                                                                                                                            │
 │  ▐█▛█▛█▌  Welcome to Kimi Code!                                                                                                                            │
 │  ▐█████▌  Send /help for help information.                                                                                                                 │
 │                                                                                                                                                            │
 │  Directory: /tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain                                                                              │
 │  Session:                                                                                                                                                  │
 │  Model:     test                                                                                                                                           │
 │  Version:   2.3.1                                                                                                                                          │
 │                                                                                                                                                            │
 ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
 ✦ Kimi K3.1 Pro is ready - use the model in a fresh session for the best results
   Standard: Plus/Moderato and above; Highspeed: Pro/Allegretto and above
   No session yet — one will be created on your first message.
   tmux extended-keys is off. Modified Enter keys may not work. Add `set -g extended-keys on` to ~/.tmux.conf and restart tmux.
 ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

... [3507 bytes truncated] ...


 │  Model:     test                                                                                                                                           │
 │  Version:   2.3.1                                                                                                                                          │
 │                                                                                                                                                            │
 ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
 ✦ Kimi K3.1 Pro is ready - use the model in a fresh session for the best results
   Standard: Plus/Moderato and above; Highspeed: Pro/Allegretto and above
   No session yet — one will be created on your first message.
   tmux extended-keys is off. Modified Enter keys may not work. Add `set -g extended-keys on` to ~/.tmux.conf and restart tmux.
 ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
 │ > Read the brief at /tmp/fm-lab.xcB3QD/data/kp1/launch-brief.md and follow it exactly.                                                                     │
 │                                                                                                                                                            │
 ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
 Never Ask  test  …/proj-plain-6d2877/1/proj-plain                                                                                    /init: generate AGENTS.md
                                                                                                                                                    context: 0%
##### frame 10 (t=10s)
treehouse get
firstmate@firstmate-hz:/tmp/fm-lab.xcB3QD/proj-plain$ treehouse get
A new version of treehouse is available: v2.3.0 → v3.1.5
Run "treehouse update" to update
🌳 Setting up worktree...
🌳 Entered worktree at ~/.treehouse/proj-plain-6d2877/1/proj-plain. Type 'exit' to return.
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ cd -- '/tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain'
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export GOTMPDIR=/tmp/fm-kp1/gotmp
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export COMPACT_ADVISER_DISABLE=1
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ export FM_TASK_ID=kp1
firstmate@firstmate-hz:~/.treehouse/proj-plain-6d2877/1/proj-plain$ . '/tmp/fm-kp1+ed5198cd00e35844b3782356ce2394df287a2e8a0c1c65d64e018e659f2acda0/launch.s1792
854044.2317403.21124.sh'
 ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
 │                                                                                                                                                            │
 │  ▐█▛█▛█▌  Welcome to Kimi Code!                                                                                                                            │
 │  ▐█████▌  Send /help for help information.                                                                                                                 │
 │                                                                                                                                                            │
 │  Directory: /tmp/fm-lab.xcB3QD/home/.treehouse/proj-plain-6d2877/1/proj-plain                                                                              │
 │  Session:                                                                                                                                                  │
 │  Model:     test                                                                                                                                           │
 │  Version:   2.3.1                                                                                                                                          │
 │                                                                                                                                                            │
 ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
 ✦ Kimi K3.1 Pro is ready - use the model in a fresh session for the best results
   Standard: Plus/Moderato and above; Highspeed: Pro/Allegretto and above
   No session yet — one will be created on your first message.
   tmux extended-keys is off. Modified Enter keys may not work. Add `set -g extended-keys on` to ~/.tmux.conf and restart tmux.
   Error: Failed to start a session: Model "test" is not configured in config.toml.
 ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
 │ >                                                                                                                                                          │
 ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
 Never Ask  test  …/proj-plain-6d2877/1/proj-plain                                                                                    /init: generate AGENTS.md
                                                                                                                                                    context: 0%
Evidence: Live guard against installed Kimi 2.3.1: announcing prompts never answered, marker never ran

Source: Live guard against installed Kimi 2.3.1: announcing prompts never answered, marker never ran

ok - kimi 2.3.1: a plain directory's folder prompt is the complete dialog, and Enter clears it into a ready pane # kimi 2.3.1: root-mcp-json prompt announces: Start 1 MCP server automatically;Config: .mcp.json; ok - kimi 2.3.1: a root-mcp-json declaration is announced on the folder prompt, which receives no answer, and its command never ran ok - kimi 2.3.1: a kimi-code-mcp-json declaration is announced on the folder prompt, which receives no answer, and its command never ran ok - kimi 2.3.1: a short pane collapses the prompt below the complete dialog, and a slightly taller one pages it with the page marker on screen

# kimi 2.3.1: plain prompt options read 'Trust and continue' / 'Exit'
ok - kimi 2.3.1: a plain directory's folder prompt is the complete dialog, and Enter clears it into a ready pane
# kimi 2.3.1: root-mcp-json prompt announces: Start 1 MCP server automatically;Config: .mcp.json;
ok - kimi 2.3.1: a root-mcp-json declaration is announced on the folder prompt, which receives no answer, and its command never ran
# kimi 2.3.1: kimi-code-mcp-json prompt announces: Start 1 MCP server automatically;Config: .kimi-code/mcp.json;
ok - kimi 2.3.1: a kimi-code-mcp-json declaration is announced on the folder prompt, which receives no answer, and its command never ran
# kimi 2.3.1: 100x7 pane shows: Trust this folder?;Enlarge terminal to review sources. Esc exit.;
# kimi 2.3.1: 100x12 pane: the announcement is on a hidden page, so only the page marker refuses this prompt
ok - kimi 2.3.1: a short pane collapses the prompt below the complete dialog, and a slightly taller one pages it with the page marker on screen
ok - kimi 2.3.1: folder-prompt predicates agree with the installed Kimi on every recorded wording
exit=0
Evidence: Real kimi -p 2.3.1 in a declaring directory skips the untrusted project server

Source: Real kimi -p 2.3.1 in a declaring directory skips the untrusted project server

Warning: this folder is not trusted; skipped 1 project-level MCP server: lab-marker (stdio: /tmp/fm-lab.xcB3QD/marker-p.sh --from-kimi-p). Run kimi here and choose "Trust this folder", or set KIMI_CODE_TRUST_WORKSPACE=1, to enable them. === marker-p.log (end marker)

$ kimi -p 'Reply with the word hello.'  (cwd declares lab-marker in .kimi-code/mcp.json; disposable HOME, no login)
kimi version 2.3.1
Warning: this folder is not trusted; skipped 1 project-level MCP server: lab-marker (stdio: /tmp/fm-lab.xcB3QD/marker-p.sh --from-kimi-p).
  Run `kimi` here and choose "Trust this folder", or set KIMI_CODE_TRUST_WORKSPACE=1, to enable them.

error: failed to run prompt: No model configured. Run `kimi` and use /login to sign in, then retry; or set default_model in config.toml.
See log: /tmp/fm-lab.xcB3QD/home-p/.kimi-code/logs/kimi-code.log
kimi-exit=1
=== marker-p.log
(end marker)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

⏭️ **Rebase** - skipped

Step was skipped.

⚠️ **Review** - 3 infos
  • ℹ️ tests/fm-kimi-harness.test.sh:131 - The fake Kimi's fake_start_project_mcp runs commands only from $FM_FAKE_PANE_PATH/.kimi-code/mcp.json unless FM_FAKE_KIMI_PROJECT_MCP is set. test_kimi_root_mcp_json_declaration_refuses_before_launch (line 1388) publishes its declaration at the root .mcp.json (line 1398) and runs with FM_FAKE_KIMI_TRUST=remembered, so if the .mcp.json entry were dropped from kimi_project_mcp_blocks_launch, the fake would launch, go ready, and never run the marker: assert_project_command_stayed_idle at line 1407 cannot fail there. The launch.log assertion is what carries that case. This is the same vacuous-marker pattern the round-1 decision asked to make falsifiable for the other declaration tests. Remedy: make the fake read both .kimi-code/mcp.json and .mcp.json at the pane path, mirroring what tests/captures/kimi-code-2.3.0/README.md records Kimi 2.3.0 doing.
  • ℹ️ tests/fm-kimi-harness.test.sh:410 - assert_project_command_stayed_idle (line 410, checks ! -e marker.log) duplicates the pre-existing assert_project_server_stayed_idle (line 1501, checks ! -s marker.log and prints the log). Both read the same $CASE_DIR/marker.log that run_spawn wires via FM_FAKE_MCP_MARKER_LOG, and the marker script only ever appends a line, so the -e and -s checks are equivalent in practice. Keep one helper (the -s variant with the log in its failure message is the more useful one) and use it at lines 1282, 1301, 1365, 1407, 1460, 1478, 1497.
  • ℹ️ bin/fm-spawn.sh:7201 - The declaration read runs after the endpoint is opened (line 4894), the task metadata is published (line 6715), and the launch file is staged (line 7192), so a refused directory leaves an open window holding only a shell, a leased worktree, a staged launch file, a metadata record, and a status line that ends with inspect window $T. That mirrors the existing readiness-failure path, where a worker is actually running in the window, and it is how the supervisor sees the reason, so it satisfies the intent. The worktree content is available from line 4870 (validate_spawn_worktree) and line 3700 for secondmates, which is where the read could run instead to refuse before any endpoint or record exists. Noting the tradeoff only; no change required.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 6 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Spawn a Kimi crewmate into a worktree whose .kimi-code/mcp.json declares a project MCP server: the launch is refused before Kimi starts, the status file names the declaration and the consent reason, a… ✅ pass live real-spawn-declared-kimi-code-mcp-json.txt: 'failed: refusing Kimi launch: .kimi-code/mcp.json in this directory declares project MCP servers...' in state/kd1.status, pane shows only treehouse get and…
Spawn into a worktree whose root .mcp.json (undocumented location Kimi 2.3.x honors) declares a project MCP server: refused before launch naming .mcp.json ✅ pass live real-spawn-root-mcp-json.txt: status 'refusing Kimi launch: .mcp.json in this directory declares project MCP servers', no kimi command in pane, marker.log empty
Adversarial: a .kimi-code/mcp.json that is not valid JSON cannot be proven empty, so the launch is refused with the 'could not be read' reason instead of proceeding ✅ pass live real-spawn-malformed-kimi-code-mcp-json.txt: status 'refusing Kimi launch: .kimi-code/mcp.json in this directory could not be read. Firstmate cannot prove it declares no project MCP servers, so Kimi w…
Spawn into a directory with no project MCP servers: real Kimi 2.3.1 shows its folder prompt, Firstmate recognizes and answers it, the prompt clears into the composer, and the brief pointer is typed an… ✅ pass live real-spawn-plain-dir-frames.txt frames 7-9 and real-spawn-plain-dir.txt: workspace-trust record for the worktree written at Enter time, user-history shows 'Read the brief at .../launch-brief.md and fo…
Plain-directory spawn completes brief delivery confirmation (✨ echo or nonzero context) after the prompt is answered ⏸️ untested no Kimi cannot open a session without a configured model or login. The lab home has neither, Kimi Code CLI is not installed on this host, and the runbook forbids signing in or using a real credential sto…
Adversarial backstop: real Kimi 2.3.1 folder prompts that announce declared servers (root .mcp.json and .kimi-code/mcp.json) are recognized as announcing and never receive Enter, while the plain promp… ✅ pass live live-kimi-2.3.1-trust-prompt-guard.txt: all 5 ok lines from tests/fm-kimi-trust-prompt-live-e2e.test.sh with the pinned 2.3.1 binary, exit=0
Disabled (enabled:false), unreadable, directory-in-place, undocumented-shape, and empty-map declarations take the expected refuse/launch branches, with an isolated KIMI_CODE_HOME and a falsifiable mar… ⏸️ untested no These branches were exercised only by tests/fm-kimi-harness.test.sh against a fake kimi binary (48 ok, portable-kimi-harness-suite.txt), which is a unit-style stub run and not the live product. No rea…
kimi -p in a directory declaring a project MCP server keeps skipping the untrusted project server and does not start it ✅ pass live real-kimi-2.3.1-print-mode-declared-dir.txt: 'Warning: this folder is not trusted; skipped 1 project-level MCP server: lab-marker' and marker-p.log empty
  • bash tests/fm-kimi-harness.test.sh (PATH prefixed with the real python3/node dirs) - 48 ok, exit 0 (fake kimi binary, not live)
  • real bin/fm-spawn.sh kd1 &lt;lab&gt;/proj-declared --harness kimi --mode local-only --yolo off in a lab home with Kimi 2.3.1 on PATH - refused before launch
  • real bin/fm-spawn.sh kr1 &lt;lab&gt;/proj-rootmcp --harness kimi ... (root .mcp.json) - refused before launch
  • real bin/fm-spawn.sh km1 &lt;lab&gt;/proj-malformed --harness kimi ... (malformed .kimi-code/mcp.json) - refused with 'could not be read'
  • real bin/fm-spawn.sh kp1 &lt;lab&gt;/proj-plain --harness kimi ... with 1s viewport frame capture - prompt shown, answered, cleared, brief pointer typed
  • FM_KIMI_TRUST_PROMPT_LIVE=1 bash tests/fm-kimi-trust-prompt-live-e2e.test.sh with the pinned Kimi 2.3.1 on PATH - all ok
  • real kimi -p &#39;Reply with the word hello.&#39; in a directory declaring a stdio project MCP server, disposable HOME - skipped the untrusted server, marker idle
  • sha256 of the downloaded kimi binary matched the vendor manifest checksum for 2.3.1
  • isolation checks: ls ~/.kimi-code absent, real ~/.treehouse has no lab projects, default tmux server has no fm-k*1 windows, git status --short clean
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Answering the folder prompt can start those targets without a consent
decision that covers them. Directories with no project MCP servers still
get past the folder prompt, and kimi -p is unchanged.

Refs kunchenguid#5226

This does not close the issue. A directory that declares project MCP
servers still cannot reach the Kimi composer until a later consent design.
@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds a safety check before launching Kimi with project MCP servers.

The PR appears safe to merge; no blocking issues remain.

What we checked:

  • Unreadable files still clean up: Cleanup makes directories writable, then removes their contents without reading the file.

Reviews (3) · Last reviewed commit: "no-mistakes(ci): The Greptile finding is..." · Reviewed by Greptile

Comment thread tests/fm-kimi-harness.test.sh Resolved
…ss.test.sh; no production code changed. Invariant: a project MCP declaration that Firstmate cannot read must refuse the Kimi launch, and each refusal cause must have a test named for that cause. The causes in kimi_project_mcp_blocks_launch are: not a regular file, no read permission, malformed JSON, and an undocumented mcpServers shape. Only the no-read-permission cause had no test, and the malformed JSON test carried the wrong name. Changes: - Renamed test_kimi_unreadable_project_mcp_refuses_before_launch to test_kimi_malformed_json_project_mcp_refuses_before_launch, and reworded its failure and pass messages to say malformed JSON. - Added a new test_kimi_unreadable_project_mcp_refuses_before_launch. It writes a valid empty server map ({"mcpServers":{}}) into the worktree, sets the file to mode 000, and asserts the spawn exits non-zero, Kimi never starts, no key is sent, and the output says "could not be read". The content is an empty map on purpose: a readable empty map launches, so only the missing read permission can cause the refusal. - When the test runs as root, that one case reports a pass line that states it was skipped because mode 000 does not restrict root. This follows the existing idiom in tests/fm-control-relaunch.test.sh. The root-proof variant (a directory where the file is expected) already exists as test_kimi_directory_in_place_of_project_mcp_refuses_before_launch, so I did not duplicate it. Verification, run locally as uid 1000: - bash tests/fm-kimi-harness.test.sh passed every case, including both the renamed case and the new one. - I temporarily removed the chmod 000 line and reran the suite: the new case failed with "an unreadable project MCP declaration should refuse the launch". I then restored the line. So the case can fail. - The root skip branch was not exercised, because the run was not as root. One environment note, not caused by this change: with the mise shim directory on PATH, the suite stops at an earlier case ("Kimi hook install refused a realistic config"), because mise tries to install python 3.12.14 under the test HOME and GitHub returns a rate limit 403. I ran the suite with the mise shim directory removed from PATH for that shell only, and changed no configuration
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: first look at head 71b541f9 against main 237e1cf3 (it is based on the current tip). Thanks, @tiago-peixoto, for the base-commit reproduction and the nine live Kimi 2.1.1 runs. Nothing is waiting on you. This is now a captain decision.

What I checked: the whole diff and the thread on #5226. Before the Kimi launch line is sent, bin/fm-spawn.sh reads .kimi-code/mcp.json in the worktree. It refuses with a named reason when the file declares any project server (including enabled: false), or when it can't be proven empty (unreadable, not a file, invalid JSON, a mcpServers that is not an object, or no jq). The jq read only happens when that file exists. A missing file, a missing key, or an empty map still launches kimi --auto and answers the complete folder prompt as before. As a backstop, kimi_wait_for_ready fails without pressing a key whenever the pane shows Project MCP targets:. The clipped-dialog failure message now says no key was sent. The test changes use an isolated KIMI_CODE_HOME, cover each refusal shape and both still-answered cases, and assert that the ambient home is untouched. Your reply on the Greptile P2 (the separate unreadable-file case, with a root skip) resolves it. There are no workflow edits and nothing suspicious.

Gates: CI green on 71b541f9 (run 37574350950, every behavior, lint, invariant and coverage job). Require no-mistakes passed, and the attestation matches the head. Greptile is 5/5 with no open threads. The merge state is CLEAN.

Contract-class: new-default. This differs from the "restore" note I left on #5226. Here is why. Main's specified Kimi path (references/harness/kimi.md, from #4799) is to answer a complete folder prompt live with Enter and continue. On an unconfigured fleet, a project that declares MCP servers used to launch Kimi. That launch was unsafe, because the Enter starts the listed targets. Now the launch is refused, and Kimi in that directory stops working until a consent design exists. That replaces the specified default path rather than repairing a broken one. The security motive is real and VISION supports it, but a security motive alone does not make this a restore. The new refusals for an unreadable file or a missing jq are also new default behavior. #5226's three-design question (refuse, record consent, or answer in person) is already with the captain, and this PR is Design 3. So landing it is the captain's call, not an auto-merge.

VISION.md, rule by rule

  • One captain, one interface: aligns. A clear named refusal replaces both a silent target start and a wedged pane.
  • Authority is explicit and never inferred: aligns strongly. An unattended Enter that starts project MCP commands assumed consent for a security-sensitive action, and this removes it.
  • Scripts own the mechanics, agents own the judgment: aligns. An exact declaration read plus a fixed pane-header backstop.
  • A restart is a non-event: aligns. The refusal is written to the task status log, and no trust file is written.
  • Delegation with a spine: aligns. The machinery refuses rather than guesses, and a scheduled task fails visibly instead of half-starting.
  • The fleet outlives any vendor: aligns. The quarantined Kimi adapter is re-checked against 2.1.1 and 0.43.1 prompts, and the dated reference is updated.
  • Scope: aligns. This is a harness-adapter launch gate. It is only a partial fix for Kimi project-MCP workspace trust has no consent-safe way to reach the composer #5226, because a declaring directory still can't reach the composer.

Next step: waiting on the captain to merge or leave. The question is whether to adopt Design 3 now: refuse Kimi launches in a directory that declares project MCP servers, leave MCP-free directories and kimi -p unchanged, and let a later opt-in consent design build on it. Your branch is ready as it is. Thank you.

@tiago-peixoto tiago-peixoto changed the title fix(bin): refuse Kimi launch when project MCP servers are declared fix(bin): refuse Kimi spawns in directories that declare project MCP servers Oct 15, 2026
@tiago-peixoto tiago-peixoto changed the title fix(bin): refuse Kimi spawns in directories that declare project MCP servers fix(bin): refuse Kimi launch when project MCP servers are declared Oct 22, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @tiago-peixoto for keeping this current with main. I checked the new tip 0533ed8e. The two main merges, plus a one-line docs/configuration.md pointer, leave the PR diff at the same 4 files, and the attestation in the body matches this head.

CI: everything passed except Behavior portable serial 6, which failed on remote-secondmate-lifecycle ("the watcher did not exit on its auto-relaunch wake within the bound"). That's a known flake on main that has nothing to do with Kimi, so I re-ran the failed job on run 39816721758. Require no-mistakes passed.

Unchanged: contract-class new-default, for the reason in my Oct 7 note (an MCP-declaring directory goes from launch to refuse on the unconfigured Kimi path). VISION still aligns rule by rule. This is a standing captain hold for Kun's merge-or-leave decision, tied to the design question on #5226. It's not waiting on you.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @tiago-peixoto. Head 0533ed8e is unchanged since my last note, every check is green, GitHub reports it mergeable, and the no-mistakes attestation still binds this head.

My contract-class read is unchanged: new-default (an MCP-declaring directory goes from launch to refuse on the unconfigured Kimi path). So I won't merge it on my own: it now goes to Kun as a merge-or-leave decision. This is the standing captain hold tied to #5226; the serial 6 re-run came back green. For Kun's decision: your new #7658 shows Kimi 2.3.0 drops the Project MCP targets: header and reads a root .mcp.json, so this backstop would not fire on 2.3.0 as it stands.

This is with Kun now, not waiting on you. Nothing more is needed from you unless he asks for a change.

# Conflicts:
#	.agents/skills/harness-adapters/references/harness/kimi.md
#	bin/fm-spawn.sh
#	docs/configuration.md
#	tests/fm-kimi-harness.test.sh
@tiago-peixoto tiago-peixoto changed the title fix(bin): refuse Kimi launch when project MCP servers are declared fix(bin): refuse Kimi launch when the directory declares project MCP servers Oct 24, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @tiago-peixoto for bringing this up to date again. New head 8e8cb2d1 merges main, which now has the Kimi 2.3.0 prompt handling from #7658. The PR's own diff now touches five files (bin/fm-kimi-trust-lib.sh is new). Three things changed:

  • The pre-launch refusal reads a root .mcp.json as well as .kimi-code/mcp.json.
  • The 2.1.1/0.43.1 Project MCP targets: header is kept as a recognised announcement next to the 2.3.0 wording.
  • The docs are adapted to match.

All 19 checks are green on this head, the no-mistakes attestation binds it (live 6/8 go), and GitHub reports it CLEAN. The diff touches no workflows or secrets.

Contract-class: still new-default. A directory that declares project MCP servers now goes from launch, or a refused prompt, to a refusal before Kimi starts. That now includes any repo with a root .mcp.json. This addresses my Oct 22 note that the backstop wouldn't fire on 2.3.0. VISION: still aligns rule by rule.

This stays a standing captain hold for Kun's merge-or-leave decision, tied to #5226. It's not waiting on you.

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.

2 participants