MoonshotAI / MoonshotAI/kimi-code

Streaming 时 ESC/Ctrl+C 无法中断——模型产生重复 tool call 后 TUI 卡死

Open
#2,739 1 comment 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?

0.34.0

Which open platform/subscription were you using?

n1n/gpt-5.6-luna,thinking effort = xhigh(via n1n provider)

Which model were you using?

gpt-5.6-luna

What platform is your computer?

Darwin bogon 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:53:31 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T8103 arm64 arm

What issue are you seeing?

现象:
• 模型 streaming 在 82s 后返回 869 output tokens + 7 个 tool call(其中存在重复:同一文件被 Read 多次)
• wire log 中没有任何 tool.result 事件——tool call 从未被执行
• 从 streaming 返回到 turn.cancel 之间有约 16 分钟空白,期间 ESC / Ctrl+C 完全无响应
• 最终 turn.cancel 在约 17 分钟后才生效(reason: user_cancelled)

核心怀疑:
Streaming → tool execution 状态转换异常(可能由重复 tool call 触发),导致中断信号处理在该状态窗口内失效,用户无法中断。

相关 wire log 片段:

  [1786159199727] llm.request: model=gpt-5.6-luna, effort=xhigh, msgs=21
  [1786159281764] usage.record: output=869
  [1786159281851-853] 7x tool.call (Read: MEMORY.md ×2, AGENTS.md ×2, personal-principles.md ×2+1)
                    ← 16 分钟空白,无 tool.result,ESC/Ctrl+C 无响应 →
  [1786160229456] turn.cancel: reason=user_cancelled
What steps can reproduce the bug?

复现步骤:

  1. 在会话中切换到 gpt-5.6-luna 模型,effort=xhigh
  2. 发送一条 prompt,模型 streaming 响应极慢(首 token ~82s)
  3. 模型返回后,尝试按 ESC / Ctrl+C 中断
What is the expected behavior?

按 ESC / Ctrl+C 中断

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 streaming-to-tool-execution transition and the ESC/Ctrl+C cancellation path described by the wire log. Reproduce with gpt-5.6-luna at xhigh effort and check the repeated Read calls, missing tool.result events, and delayed turn.cancel. Done means cancellation responds promptly during this state and the reported sequence no longer leaves the TUI unresponsive.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.