Skip to content

feat: add Kimi CLI support for spawn backends#36

Merged
tjb-tech merged 3 commits intoHKUDS:mainfrom
he-yufeng:feat/kimi-cli-support
Mar 20, 2026
Merged

feat: add Kimi CLI support for spawn backends#36
tjb-tech merged 3 commits intoHKUDS:mainfrom
he-yufeng:feat/kimi-cli-support

Conversation

@he-yufeng
Copy link
Copy Markdown
Contributor

Summary

Adds first-class support for Kimi CLI (Moonshot AI) as a spawn target, alongside Claude, Codex, Nanobot, and Gemini.

Changes

Both backends (tmux_backend.py, subprocess_backend.py):

  • _is_kimi_command() — detects kimi binary
  • Permission skipping via --yolo flag
  • Workspace directory via -w flag (same pattern as nanobot)
  • Prompt injection via --print -p flags (non-interactive mode with prompt)

Tmux backend additionally:

  • Workspace trust confirmation (kimi uses the same trust dialog as Claude)
  • _is_interactive_cli() updated to include Kimi
  • Generic send-keys fallback skips Kimi (prompt already baked into command)

Tests: 3 new tests covering tmux spawn, subprocess spawn, and workspace trust detection. All 187 tests pass.

Usage

# team config
[agents.coder]
command = ["kimi"]
clawteam spawn coder --skip-permissions --prompt "fix the bug"
# → kimi --yolo -w /path/to/workspace --print -p 'fix the bug'

Key Kimi CLI flags used

Flag Purpose
--yolo Auto-approve all tool calls (like Claude's --dangerously-skip-permissions)
-w PATH Set working directory
--print Non-interactive mode (exits after completion)
-p "prompt" Pass task prompt

Test plan

  • pytest tests/test_spawn_backends.py — 17/17 pass
  • pytest (full suite) — 187/187 pass
  • ruff check — clean

he-yufeng and others added 3 commits March 19, 2026 19:31
Adds first-class support for Moonshot AI's Kimi CLI as a spawn target.

Both tmux and subprocess backends now handle:
- Command detection (`kimi` binary)
- Permission skipping via `--yolo` flag
- Workspace directory via `-w` flag (like nanobot)
- Prompt injection via `--print -p` flags
- Workspace trust confirmation (same pattern as Claude)

3 new tests, 187 total passing.
kimi-cli has no Claude-like "trust this folder" startup dialog.
The --yolo flag already handles all permission bypassing. The trust
prompt strings were incorrectly assumed from Claude Code's behavior.
@tjb-tech tjb-tech merged commit 8d6a256 into HKUDS:main Mar 20, 2026
7 checks passed
a24ibrah pushed a commit to a24ibrah/ClawTeam that referenced this pull request Mar 30, 2026
feat: add Kimi CLI support for spawn backends
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