MoonshotAI / MoonshotAI/kimi-cli

Bug: Breaking ACP terminal usage

Open
#1,517 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

What version of Kimi Code CLI is running?

1.22.0

Which open platform/subscription were you using?

Unclear question. Kimi Coding Plan. Kimi CLI and acpx

Which model were you using?

Kimi K2.5 from the coding plan

What platform is your computer?

Windows 11

What issue are you seeing?

I built workflow that lets Codex spawn Kimi sub-agents via ACP. However, due to terminal execution being broken, it does not fully work.

Windows Execution Policy

rlm-workflow-acp supports ACP delegation on Windows with this policy:

  • ACP (acpx) is the control plane only (session + prompt delivery).
  • Kimi writes code and RLM artifacts directly in the assigned worktree/run folder.
  • Delegated verification (Phase 4) is executed inside the delegated ACP session via the MCP argv-runner (rlm-command-runner / rlm_run_command) and must produce an evidence JSON file under the run folder.
  • Direct kimi acp Shell/Terminal execution via ACP terminal/create is treated as unreliable/unsupported on Windows for now.

What Moonshot needs to fix in Kimi Code CLI for full ACP-on-Windows support:

  • In ACP mode, the Shell tool is replaced with an ACP terminal-backed tool. Today it calls terminal/create with a single combined command string. On Windows this fails because the ACP client tries to spawn an executable literally named like "py -3 -m unittest ...".
  • The fix is to pass argv correctly to ACP: call terminal/create(command=<executable>, args=[...]) (or wrap via powershell.exe -command <string> like the non-ACP Shell tool does), and include cwd so execution happens in the assigned worktree.

My issue is related to this currently open issue: https://github.com/MoonshotAI/kimi-cli/issues/1380

What steps can reproduce the bug?

Call Kimi over ACP and let it run terminal commands.

What is the expected behavior?

No response

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the ACP terminal-backed Shell tool and its terminal/create call, comparing it with the non-ACP Shell behavior and issue 1380. Reproduce an ACP terminal command on Windows 11, then verify that executable, args, and cwd are passed separately so commands run in the assigned worktree.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.