MoonshotAI / MoonshotAI/kimi-code
ACP + Zed: prompt with multiple attached files fails with `Internal error: session prompt failed`
Nobody has claimed this yet.
- 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?
Reproduced on Kimi Code CLI 0.25.*, 0.24.*, and 0.23.*. Current version is 0.25.0
Which open platform/subscription were you using?
Kimi Code (OAuth).
Which model were you using?
kimi-for-coding
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
When using Kimi Code CLI as an ACP agent in Zed, sending a prompt with multiple attached files fails with the JSON-RPC error:
{
"code": -32603,
"message": "Internal error: session prompt failed"
}
Single-file or text-only prompts work fine.
What steps can reproduce the bug?
- Configure Zed to use
kimi acpas the agent server.
// ~/.config/zed/settings.json
{
"agent_servers": {
"Kimi Code CLI": {
"default_config_options": {
"mode": "yolo"
},
"type": "custom",
"command": "kimi",
"args": ["acp"],
"env": {}
}
}
}
- Open a new agent thread in Zed.
- Attach two or more files to the prompt via drag-and-drop or @-mention.
- (Optional) Add any user text and submit.
Zed sends ACP content blocks similar to:
[
{ "type": "resource", "resource": { "uri": "file:///.../a.tsx", "text": "..." } },
{ "type": "text", "text": " " },
{ "type": "resource", "resource": { "uri": "file:///.../b.tsx", "text": "..." } },
{ "type": "text", "text": " " },
{ "type": "text", "text": "todo: ..." }
]
What is the expected behavior?
The prompt should be accepted and the turn should start, preserving the whitespace separators inside the merged text rather than as standalone text parts.
Additional information
Affected editor versions: Zed 1.10.*, 1.11.*, and 1.12.0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the kimi acp agent-server entry point and trace how Zed's ACP content-block array becomes a session prompt. Reproduce the failure with two resource blocks and intervening whitespace, then verify that multiple attached files are accepted and the separators remain in the merged text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100