feat: verify kimi-code as a crewmate harness adapter#1
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.