MoonshotAI / MoonshotAI/kimi-code
fix(tui): statusline command spawns visible console windows on Windows (missing windowsHide)
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.40.1, native Windows CLI, Windows 11 + Windows Terminal
Problem
When a [status_line] command is configured, the TUI re-runs the external command on a fixed interval. On Windows each spawn briefly opens a visible console window because the child process is created without windowsHide: true. With the default rerun cadence a console window pops up every few seconds over whatever the user is doing.
Repro
- On Windows, set a statusline command in
tui.toml([status_line] command = "python statusline.py"). - Watch the screen: a console window flashes every refresh cycle.
Analysis
In the statusline runner (status-line-command.ts) the spawn options omit windowsHide. The SDK hook spawn chain already sets windowsHide: true — which is why hooks never flash; the statusline runner does not.
Fix
Add windowsHide: true at the two spawn call sites in the statusline runner. We have been running this as a local patch; happy to open a PR.
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 in the status-line runner, status-line-command.ts, and inspect the two spawn call sites described in the issue. Compare their options with the SDK hook spawn chain, which already uses windowsHide. Done means statusline commands no longer flash visible console windows on Windows during refreshes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100