kimi-cli icon indicating copy to clipboard operation
kimi-cli copied to clipboard

windows 版本的herdr中,无法使用方向键选择 || In the windows version of herdr, you cannot use the arrow keys to select

Open RambleRainbow opened this issue 4 months ago • 1 comments

What version of Kimi Code CLI is running?

0.27.0

Which open platform/subscription were you using?

/login

Which model were you using?

k3

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What issue are you seeing?

在herdr中,运行kimi。 当出现选项时,无法用方向键选择。 比如 slash command,产生的候选列表 比如 /model命令,出现的k2.7/ k3选项(不能用方向键选择,但search还可以用)

另外,只在WINDOWS下出现 , MACOS正常

What steps can reproduce the bug?

在WINDOWS的终端/Powershell里

  1. 运行herdr
  2. herdr的终端里,再运行kimi
  3. /model,进行模型选择
  4. 方向键无法选择模型

What is the expected behavior?

方向键正常使用

Additional information

No response


What version of Kimi Code CLI is running?

0.27.0

Which open platform/subscription were you using?

/login

Which model were you using?

k3

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What issue are you seeing?

In herdr, run kimi. When an option appears, it cannot be selected with the arrow keys. For example, slash command, the candidate list generated For example, in the /model command, the k2.7/k3 option appears (cannot be selected with the arrow keys, but search can still be used)

In addition, it only appears under WINDOWS, and is normal on MACOS.

What steps can reproduce the bug?

In the WINDOWS terminal/Powershell

  1. Run herdr
  2. In the terminal of herdr, run kimi again
  3. /model, select model
  4. The model cannot be selected using the arrow keys

What is the expected behavior?

Direction keys work normally

Additional information

No response

RambleRainbow avatar Jul 20 '26 02:07 RambleRainbow

补充上游分析和已验证的修复方向 / Additional upstream analysis and a proven fix direction.

复现环境 / Environment

  • Windows 10 10.0.19045.6456
  • herdr 0.7.5-preview.2026-07-21-0f10e1453a7f
  • kimi 0.29.0

同一问题:herdr pane 内 /model 与 slash command 候选列表无法方向键选择,搜索可用;herdr 外直接运行 kimi 一切正常。Claude Code / Codex / Hermes 在同样 herdr 环境下正常。

根因(herdr 侧已字节级定位)/ Root cause

详见 ogulcancelik/herdr#1533(尤其 @ayu-exorcist 的隔离测试,环境与本 issue 完全一致):

  • kimi 启动时协商增强键盘协议(ESC [ > 7 u、ESC [ ? u,随后 DA)。
  • 协商完成后,Windows 10 系统自带的老版 ConPTY 会吞掉方向键 / Esc / Ctrl 组合键序列。herdr pane 使用系统 conpty.dll,与外层终端无关,换 cmd / PowerShell / Windows Terminal 均无效。
  • 通过 herdr socket API 复现:herdr pane send-keys <pane> up 返回成功但 pane 收不到任何字节;herdr pane send-text 发送原始转义序列则正常。
  • Claude Code / Codex 不启用该协商,因此在同一环境下不受影响;只有启用 Kitty / modifyOtherKeys 的 agent(kimi、pi)触发此问题。

Root cause (from ogulcancelik/herdr#1533, esp. the byte-level isolation by @ayu-exorcist): after the agent negotiates the enhanced keyboard protocol (ESC [ > 7 u, ESC [ ? u), the legacy Windows 10 system ConPTY used by herdr panes swallows arrow/Esc/Ctrl sequences entirely — herdr pane send-keys reports success but delivers no bytes, while raw send-text escape sequences get through. Agents that do not enable Kitty/modifyOtherKeys (Claude Code, Codex) are unaffected in the same environment.

已有先例的修法 / Proven fix direction (from pi)

pi 遇到过一模一样的问题,其修法是:检测到 HERDR_PANE_ID 环境变量时跳过增强键盘协议协商,13/13 测试通过。kimi 可以采用同样的检测,改动成本很低,也无需等待 herdr 打包新版 ConPTY 或 Windows 10 系统更新。

pi hit the exact same issue and fixed it by skipping the enhanced-keyboard negotiation when HERDR_PANE_ID is present (13/13 tests passed). Kimi could adopt the same low-cost detection instead of waiting for herdr to bundle a newer ConPTY.

nardinmarcus avatar Jul 24 '26 06:07 nardinmarcus