MoonshotAI / MoonshotAI/kimi-code
ACP: scheduled (cron) turns emit no session/update events, so clients cannot tell the session is busy
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Environment
- kimi-code 0.36.1, launched as
kimi acpover stdio - Model
kimi-code/k3, thinking effort high - Linux x86_64; the client is a custom ACP client (session multiplexer)
What happened
Our agent created an hourly cron job for itself (47 * * * *) using the built-in cron feature, to babysit a long fuzzing campaign.
Timeline (UTC, 2026-08-17):
- 03:47 — the cron fired. kimi-code started a long scheduled turn:
kimi-code.logshows steadyllm request/response turnStep=5.xtelemetry and the process spawns tool subprocesses (cargo test,sleep 290wait-polls). The turn ran for well over 45 minutes and was healthy the whole time. - 04:22:52 — the user sent a
session/prompt("status?"). kimi-code accepted it and queued it behind the scheduled turn. That queuing behavior is fine. - 04:22 → 04:34+ — zero
session/updatenotifications arrived over ACP. Not for the scheduled turn's activity, and no signal that a scheduled turn was running at all.
The problem
From the client side the session is indistinguishable from a hung agent: the prompt was accepted, the timer climbs, and nothing ever arrives. We only established that the agent was busy (not broken) by logging into the machine and reading kimi-code.log and the process table.
Everything kimi-code was doing — LLM steps, tool calls — is exactly the material session/update exists to carry. It just is not emitted for scheduled turns.
Suggested fix
Either of these would resolve it:
- Minimal: emit a
session/update(or a_metanotification) when a scheduled turn starts and ends. That alone lets a client render "busy with scheduled task" and explain why an interactive prompt is waiting. - Better: stream scheduled-turn activity as normal
session/updatenotifications. They are session-scoped notifications, so this fits the wire format; if there is concern about clients that assume updates only occur inside a prompt turn, gate it behind a client capability flag atinitializetime.
We recognize ACP's docs frame session/update as part of prompt processing and the spec has no concept of agent-initiated turns — but kimi-code already runs such turns, so some visibility signal is needed for any ACP client to present them sanely.
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 scheduled-turn and ACP session/update handling, comparing cron-triggered turns with session/prompt processing. Review the initialize capability context mentioned in the issue and trace where scheduled activity could become session-scoped notifications. Done means an ACP client can distinguish an active scheduled turn from a hung session and receives appropriate updates or start/end signals.
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