MoonshotAI / MoonshotAI/kimi-code

kimi acp completes prompt with end_turn but emits zero agent_message_chunk updates (no visible response in generic ACP clients)

Open
#1,485 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

What version of Kimi Code is running?

Kimi Code CLI: 0.23.1

Which open platform/subscription were you using?

Kimi Code CLI: 0.23.1

Which model were you using?

kimi for coding

What platform is your computer?

Linux

What issue are you seeing?

Environment

  • Kimi Code CLI: 0.23.1 (native install, linux-x64), reproduced on 0.22.3 as well
  • OS: Ubuntu 24.04 (x86_64)
  • Auth: Kimi Code OAuth subscription (logged in via /login; interactive TUI works normally)
  • ACP client: OpenHands Agent Canvas 1.1.0 / openhands-agent-server 1.32.0, reproduced with a minimal raw JSON-RPC client as well

Summary

When driven over ACP (kimi acp), prompts are accepted and the turn completes with stopReason: "end_turn", but no session/update notifications carrying response content are ever emitted — no agent_message_chunk, no agent_thought_chunk. Generic ACP clients therefore render an empty response ("No response from ACP server" in OpenHands Agent Canvas).

The interactive TUI (kimi) answers the same prompts normally, so the account, login, and model are fine.

Steps to reproduce (minimal raw client)

  1. kimi acp
  2. Send:
    {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":true,"writeTextFile":true},"terminal":true},"clientInfo":{"name":"test","title":"Test","version":"1.0"}}}
  3. Send:
    {"jsonrpc":"2.0","id":2,"method":"session/new","params":{"cwd":"/home/user","mcpServers":[]}}
    → returns a valid sessionId, plus one available_commands_update. Session config shows model kimi-code/kimi-for-coding (K2.7 Code), thinking: on.
  4. Send:
    {"jsonrpc":"2.0","id":3,"method":"session/prompt","params":{"sessionId":"<sessionId>","prompt":[{"type":"text","text":"Answer in one sentence: what is 2+2?"}]}}

Actual behavior

Observed on stdout after step 4 (entire output):

{"jsonrpc":"2.0","id":3,"result":{"stopReason":"end_turn"}}

No session/update with agent_message_chunk or agent_thought_chunk is emitted at any point between the prompt and the result. Reproduced both with empty clientCapabilities and with fs + terminal capabilities declared.

Expected behavior

session/update notifications streaming the assistant's response (agent_message_chunk, and agent_thought_chunk when thinking is enabled) before the session/prompt result, as described in the kimi acp reference.

Additional context

  • Possibly related to the thinking-enabled default (thinking: on): the answer may be produced only as reasoning content that is never mapped to ACP updates.
  • Result latency (11–14 s per prompt in Agent Canvas logs) suggests the model does generate a response server-side; it is just never surfaced over ACP.
What steps can reproduce the bug?

Steps to reproduce (minimal raw client)

  1. kimi acp
  2. Send:
    {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":true,"writeTextFile":true},"terminal":true},"clientInfo":{"name":"test","title":"Test","version":"1.0"}}}
  3. Send:
    {"jsonrpc":"2.0","id":2,"method":"session/new","params":{"cwd":"/home/user","mcpServers":[]}}
    → returns a valid sessionId, plus one available_commands_update. Session config shows model kimi-code/kimi-for-coding (K2.7 Code), thinking: on.
  4. Send:
    {"jsonrpc":"2.0","id":3,"method":"session/prompt","params":{"sessionId":"<sessionId>","prompt":[{"type":"text","text":"Answer in one sentence: what is 2+2?"}]}}
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 reproducing the issue with kimi acp and the minimal JSON-RPC initialize, session/new, and session/prompt sequence described above. Trace the ACP prompt handling and update emission, then verify that a successful prompt produces agent_message_chunk notifications before the end_turn result, including when thinking is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.