MoonshotAI / MoonshotAI/kimi-code

[Bug] 提交指令后 TUI 短暂无响应约 0.6–1 秒,再开始处理

Open
#3,465 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

你运行的 Kimi Code 版本是?

0.40.0

你使用的是哪个开放平台/订阅?

Kimi Code OAuth(managed:kimi-code

你使用的是哪个模型?

kimi-code/k3-256k,thinking effort 为 high

你的电脑平台是?

Darwin 25.6.0 arm64 arm(macOS 26.6.2)

你遇到了什么问题?

进入新的交互式 session 并提交第一条简单指令后,TUI 不会立即显示处理状态,而是短暂无响应约 0.6–1 秒,随后才正常继续。

没有报错,首条指令时体感最明显。本地事件记录显示:

  • prompt.accepted → turn.prompt:591 ms
  • turn.prompt → llm.request:11 ms
  • 其他样本中,提交到 turn.prompt 的间隔为 590–757 ms
  • 同一 session 的后续指令也出现过 590 ms 和 704 ms 的间隔,因此并非只发生在首条指令,但新 session 的首条最容易感知
复现步骤?
  1. 在终端运行 kimi --yolo,创建新的交互式 session。
  2. 输入 hi 或任意简单指令并按 Enter。
  3. 观察 TUI:提交后约 0.6–1 秒没有立即进入处理状态,然后才开始响应。
  4. 再发送一条指令,有时也能观察到相同的短暂停顿。
期望的行为是什么?

按 Enter 后,TUI 应立即更新为处理中状态。

即使此时需要同步运行 UserPromptSubmit hook 或准备 Skills/上下文,也希望先给出即时的视觉反馈,避免界面看起来卡死。

补充信息

已脱敏的相关配置:

  • 启动方式:kimi --yolo
  • 默认模型:kimi-code/k3-256k
  • Thinking:启用,effort 为 high
  • 新 session 实际加载 98 个 Skills:95 个项目发现的 Skills、3 个内置 Skills
  • 当前 system prompt 长度约 36,668 字符
  • 配置了 5 个 hooks:SessionStartUserPromptSubmitPreToolUsePostToolUseStop
  • UserPromptSubmit hook 的超时为 10 秒,本次日志记录的实际执行时间为 134 ms

从事件顺序看,停顿发生在 prompt.acceptedturn.prompt 之间。同步 hook 调度或首轮上下文准备可能是排查方向,但目前没有足够证据直接断定根因。

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 with kimi --yolo and tracing the interval from prompt.accepted to turn.prompt, where the report observes the delay. Inspect synchronous UserPromptSubmit hook scheduling and initial Skills/context preparation; done means the TUI shows processing immediately after Enter without regressing hook or context handling.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.