MoonshotAI / MoonshotAI/kimi-code

fix(tui): statusline command spawns visible console windows on Windows (missing windowsHide)

Open Beginner friendly
#3,567 0 comments 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

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

  1. On Windows, set a statusline command in tui.toml ([status_line] command = "python statusline.py").
  2. 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.