Skip to content

feat: verify kimi-code as a crewmate harness adapter#1

Merged
raywest merged 8 commits into
mainfrom
fm/kimi-adapter-v1
Jul 19, 2026
Merged

feat: verify kimi-code as a crewmate harness adapter#1
raywest merged 8 commits into
mainfrom
fm/kimi-adapter-v1

Conversation

@raywest

@raywest raywest commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Fork-main landing of the validated kimi adapter (upstream PR kunchenguid#717 remains open). Full pipeline: review clean with captain-ruled findings applied, tests green, docs, lint, CI green.

Ray West added 8 commits July 18, 2026 17:00
Verify kimi-code 0.27.0 empirically and land the complete adapter, scoped
to crewmate/scout duty on the tmux backend.

Empirical facts (isolated KIMI_CODE_HOME + scratch tmux; dated captures):
- kimi rejects a positional prompt and -p is print-mode only, so the brief
  is delivered post-launch via tmux bracketed paste into the composer and
  submitted with the verify-and-retry Enter (multi-line arrives as ONE
  message, verified live).
- kimi fires a Stop hook at every completed turn (payload carries cwd and
  stop_hook_active); hooks load only from $KIMI_CODE_HOME/config.toml, so
  the turn-end signal adapts the grok pattern: a token-guarded global
  script + fm-turn-end.d registry + per-task .fm-kimi-turnend pointer,
  plus ONE idempotent, kimi-doctor-validated [[hooks]] Stop append that
  restores a backup and aborts the spawn on rejection.
- busy signature "ctrl+c: cancel" (space after colon, unlike grok); the
  shared default regex now covers both via 'Ctrl\+c: ?cancel'. Narrow-pane
  under-reporting is documented; the Stop-hook marker is authoritative.
- no env marker exists; detection is process-ancestry on the kimi binary.
- --model verified; no effort flag exists (record-only effort).
- the shared composer classifier reads kimi's idle bordered composer as
  empty unchanged (dark-truecolor border strips as ghost).

End-to-end proof through the modified scripts: normal-path spawn into a
treehouse worktree, brief pasted and executed under --yolo, busy read
mid-turn, turn-end marker fired per turn (including a mid-turn queued
fm-send steer), /skill:no-mistakes visible in the crewmate pane, clean
/exit, and teardown removing pointer, token, and state.

Scope refusals fail loudly: kimi --secondmate and any non-tmux backend
are refused at spawn (the herdr refusal fired live during verification).
kimi is deliberately absent from the tmux agent-liveness allowlist and
the bootstrap secondmate-liveness case (both secondmate-only surfaces).

Claude-Session: https://claude.ai/code/session_01U5XNJupDTm8CPSAx8rWtLH
@raywest
raywest merged commit a051c71 into main Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant