You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: chat: mid-turn user messages dropped; UI freezes to "done" while agent (kimi/ACP) keeps working #44155
Title: Structured chat: mid-turn user messages silently dropped; UI freezes to "done" while agent (kimi/ACP) keeps working
Environment: Orca 1.4.262, macOS 27.2.1, agent "kimi" (kimi-code CLI 2.6.2, spawned by Orca via orca-provider-exec … kimi acp), structured chat in a git workspace.
Bug A — messages sent while the agent works never reach it.
Sent a message during an active turn. Orca interrupted the turn (trace: agentSession.provider-exit, closeCause: "user-stop") and recorded my message in the chat UI, but the message never arrived at the provider: its exact text appears in Orca's chat history yet has 0 matches in the provider's own transcript (~/.kimi-code/sessions/<workspace>/session_<id>/agents/main/wire.jsonl). No reply ever came and no error was shown. Same happened again with a second message. Result: steering a running agent silently loses input.
Bug B — chat UI declares "done" while the provider is still working.
At 15:40:32 UTC Orca marked the chat "done" and stopped displaying updates. The provider actually kept running until 15:45:11 (a background-task notification had spawned another turn): it did browser verification, edited files, and ended normally with a final assistant message (kimi-code.log: zero errors, lastTurnReason: "completed"). Orca never displayed that entire turn or the closing message; orca agent read shows no entries after 15:40:32 either. The work is only discoverable by opening the real CLI session.
Expected: mid-turn messages should be queued/steered into the running turn (or explicitly rejected), never silently dropped; chat state should track the provider until the agent actually finishes.
Evidence available on request: provider-exit trace spans (closeCause user-stop / user-close, session 9ed98191-…), and the provider wire transcript showing the missing turn. Happy to sanitize and attach.
Thanks for the detailed write-up. Your trace shows the session ending with closeCauseuser-stop / user-close, which suggests Orca stopped reading the session while the kimi process kept working. To confirm that and find the fix, could you attach:
The traces you mentioned: the provider-exit spans, and the ACP wire log around 15:40 if you have it (redact anything private).
Did you press Stop or close the chat at any point during that turn, or did "done" appear on its own right after your mid-turn message?
Is the kimi process still running after the chat shows "done"? Check ps aux | grep -i kimi and include its parent PID.
Versions: your Orca version (the issue left it blank) and your kimi CLI version.
Repro: does it happen every time you send a message while kimi is working, or only on long turns?
Thanks for the detailed write-up. Your trace shows the session ending with closeCauseuser-stop / user-close, which suggests Orca stopped reading the session while the kimi process kept working. To confirm that and find the fix, could you attach:
The traces you mentioned: the provider-exit spans, and the ACP wire log around 15:40 if you have it (redact anything private).
Did you press Stop or close the chat at any point during that turn, or did "done" appear on its own right after your mid-turn message?
Is the kimi process still running after the chat shows "done"? Check ps aux | grep -i kimi and include its parent PID.
Versions: your Orca version (the issue left it blank) and your kimi CLI version.
Repro: does it happen every time you send a message while kimi is working, or only on long turns?
Follow-up with more detail. All times UTC, 2026-11-18.
Chat: Orca session 9ed98191-4e97-4137-a8db-b84f75f82f4e ("Continue work from the prior Orca session using…"), agent "kimi" → provider = kimi-code CLI 2.6.2, spawned via orca-provider-exec … kimi acp.
Provider transcript: ~/.kimi-code/sessions/<workspace>/session_88b4373b-30d0-4a2d-93d9-4602f69bd3ec/ (agents/main/wire.jsonl, logs/kimi-code.log, state.json).
Bug A — what the provider actually received vs what the UI recorded
The CLI records every input it receives as turn.prompt events. For this chat:
The Orca chat additionally contains these user messages, which have 0 matches in wire.jsonl (rg -c, verified twice):
"等等,我没有要求重做。…" (sent between 15:25:22 and 15:30:00; exact time unknown)
"你停止了 没做出任何回复" ×2 (between 15:31:19 and 15:38:15)
So they were recorded in Orca's chat history but never delivered to the provider. Consistent with this, the provider logged a system reminder at 15:31:19 — "The previous turn was interrupted by the user before completion" — the interrupt happened; the message content did not arrive.
Bug B — Orca's chat record vs the provider's record for the same session
Orca side: orca agent show → state "done", updatedAt 1795016432249 = 15:40:32.249Z. orca agent read (re-checked today) still ends at 15:40:32 + one completed Bash tool. The chat has since been closed (places: []), and its record still never received the final turn.
Provider side, same session: turn.ended events at 15:14:45 (t0), 15:25:22 (t1), 15:27:10 (t2), 15:31:19 (t3), none for t4 (hard-killed; coincides with the trace user-close below), 15:40:32 (t5), 15:45:11 (t6, prompt.completed). Final step: {"finishReason":"end_turn","providerFinishReason":"completed","rawFinishReason":"stop"}. state.json → lastTurnReason: "completed". kimi-code.log shows successful LLM calls (turnStep 6.10→6.15, 15:42:49–15:45:11, output 100–4889 tokens) and contains zero error/warn/cancel/fail lines. A file edited at 15:44Z inside that window exists on disk with no corresponding entry in Orca's chat record.
The provider process was still alive at 15:43Z and 15:51Z (verified via ps), i.e. after Orca already showed "done".
Trace spans for this session (only 2 exist; from ~/Library/Application Support/orca/logs/main.trace.ndjson):
{"type":"effect-span","name":"agentSession.provider-exit","startTimeUnixNano":"1795015880711000000","attributes":{"scope":"provider-exit","sessionId":"9ed98191-4e97-4137-a8db-b84f75f82f4e","generation":"b73da5b8-fc94-4b0d-abb2-e0be33313b7a","endedBy":"orca","reason":"closed by Orca","closeCause":"user-stop","closeReason":null},"exit":{"_tag":"Success"}}
{"type":"effect-span","name":"agentSession.provider-exit","startTimeUnixNano":"1795016280163000000","attributes":{"scope":"provider-exit","sessionId":"9ed98191-4e97-4137-a8db-b84f75f82f4e","generation":"8147c91d-4172-4102-8b3d-98b76458279c","endedBy":"orca","reason":"closed by Orca","closeCause":"user-close","closeReason":null},"exit":{"_tag":"Success"}}
No spans reference this session between 15:38:00 and its later closure; daemon.log has no entries for this session.
What we do NOT have — stated explicitly:
No minimal standalone repro (we haven't attempted a fresh reproduction; happy to run one with debug logging if you can point us to the right flags/env).
No Orca-side evidence distinguishing "ACP updates for the final turn were received and dropped" vs "never received" — we can only show the provider emitted and cleanly completed the turn while the UI never displayed any of it.
No screenshot from the moment (the chat has since been closed); the frozen record remains queryable via orca agent read 9ed98191-4e97-4137-a8db-b84f75f82f4e --json.
Exact send timestamps of the three undelivered messages (Orca's read API returns no per-message timestamps).
Thanks for the detailed follow-up. With the wire timeline we traced both symptoms to kimi-code's ACP server (2.6.2), not to Orca:
Work after "done" (Bug B). When kimi starts a turn on its own from a background-task notification (task.completed, task.lost, task.failed), its ACP server sends no session/update for that turn. It only forwards events for turns started by the current ACP session/prompt. Orca records unprompted updates when an agent sends them, but here none arrive, so the chat stops at the last turn Orca started.
Lost mid-turn messages (Bug A). A session/prompt that arrives while kimi is running one of those self-started turns is queued inside kimi. The ACP server answers it right away with stopReason: end_turn and no output, which is why the chat showed "done" with no reply. The queued text lives only in kimi's memory, so it is lost when the process is stopped or closed, which matches your user-stop / user-close spans.
Orca's steering path sends the message correctly; kimi accepts it but never runs it. The fix belongs upstream in kimi-code's ACP server: emit updates for self-started turns, and keep a queued prompt pending until it actually runs. It's worth filing this with kimi-code, and your wire log is good evidence. I'll leave this issue open in case Orca needs a follow-up once kimi changes its behavior.
Activity
nwparker commentedon Nov 18, 2026
Thanks for the detailed write-up. Your trace shows the session ending with
closeCauseuser-stop/user-close, which suggests Orca stopped reading the session while the kimi process kept working. To confirm that and find the fix, could you attach:ps aux | grep -i kimiand include its parent PID.Joey0904 commentedon Nov 19, 2026
Follow-up with more detail. All times UTC, 2026-11-18.
Chat: Orca session
9ed98191-4e97-4137-a8db-b84f75f82f4e("Continue work from the prior Orca session using…"), agent "kimi" → provider = kimi-code CLI 2.6.2, spawned viaorca-provider-exec … kimi acp.Provider transcript:
~/.kimi-code/sessions/<workspace>/session_88b4373b-30d0-4a2d-93d9-4602f69bd3ec/(agents/main/wire.jsonl,logs/kimi-code.log,state.json).Bug A — what the provider actually received vs what the UI recorded
The CLI records every input it receives as
turn.promptevents. For this chat:The Orca chat additionally contains these user messages, which have 0 matches in
wire.jsonl(rg -c, verified twice):So they were recorded in Orca's chat history but never delivered to the provider. Consistent with this, the provider logged a system reminder at 15:31:19 — "The previous turn was interrupted by the user before completion" — the interrupt happened; the message content did not arrive.
Bug B — Orca's chat record vs the provider's record for the same session
orca agent show→ state "done", updatedAt1795016432249= 15:40:32.249Z.orca agent read(re-checked today) still ends at 15:40:32 + one completed Bash tool. The chat has since been closed (places: []), and its record still never received the final turn.turn.endedevents at 15:14:45 (t0), 15:25:22 (t1), 15:27:10 (t2), 15:31:19 (t3), none for t4 (hard-killed; coincides with the traceuser-closebelow), 15:40:32 (t5), 15:45:11 (t6,prompt.completed). Final step:{"finishReason":"end_turn","providerFinishReason":"completed","rawFinishReason":"stop"}.state.json→lastTurnReason: "completed".kimi-code.logshows successful LLM calls (turnStep 6.10→6.15, 15:42:49–15:45:11, output 100–4889 tokens) and contains zero error/warn/cancel/fail lines. A file edited at 15:44Z inside that window exists on disk with no corresponding entry in Orca's chat record.ps), i.e. after Orca already showed "done".Trace spans for this session (only 2 exist; from
~/Library/Application Support/orca/logs/main.trace.ndjson):{"type":"effect-span","name":"agentSession.provider-exit","startTimeUnixNano":"1795015880711000000","attributes":{"scope":"provider-exit","sessionId":"9ed98191-4e97-4137-a8db-b84f75f82f4e","generation":"b73da5b8-fc94-4b0d-abb2-e0be33313b7a","endedBy":"orca","reason":"closed by Orca","closeCause":"user-stop","closeReason":null},"exit":{"_tag":"Success"}} {"type":"effect-span","name":"agentSession.provider-exit","startTimeUnixNano":"1795016280163000000","attributes":{"scope":"provider-exit","sessionId":"9ed98191-4e97-4137-a8db-b84f75f82f4e","generation":"8147c91d-4172-4102-8b3d-98b76458279c","endedBy":"orca","reason":"closed by Orca","closeCause":"user-close","closeReason":null},"exit":{"_tag":"Success"}}No spans reference this session between 15:38:00 and its later closure;
daemon.loghas no entries for this session.What we do NOT have — stated explicitly:
orca agent read 9ed98191-4e97-4137-a8db-b84f75f82f4e --json.nwparker commentedon Nov 19, 2026
Thanks for the detailed follow-up. With the wire timeline we traced both symptoms to kimi-code's ACP server (2.6.2), not to Orca:
task.completed,task.lost,task.failed), its ACP server sends nosession/updatefor that turn. It only forwards events for turns started by the current ACPsession/prompt. Orca records unprompted updates when an agent sends them, but here none arrive, so the chat stops at the last turn Orca started.session/promptthat arrives while kimi is running one of those self-started turns is queued inside kimi. The ACP server answers it right away withstopReason: end_turnand no output, which is why the chat showed "done" with no reply. The queued text lives only in kimi's memory, so it is lost when the process is stopped or closed, which matches youruser-stop/user-closespans.Orca's steering path sends the message correctly; kimi accepts it but never runs it. The fix belongs upstream in kimi-code's ACP server: emit updates for self-started turns, and keep a queued prompt pending until it actually runs. It's worth filing this with kimi-code, and your wire log is good evidence. I'll leave this issue open in case Orca needs a follow-up once kimi changes its behavior.
Joey0904 commentedon Nov 19, 2026
Filed upstream with kimi-code: MoonshotAI/kimi-code#5095 (same session / wire data). Will cross-post any confirmation there.