feat(tui): add a switch to disable the CLI's own terminal-title (OSC 0) writes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- shell, typescript
- Domain
- cli
Research direction
Look for the updateTerminalTitle or setTitle function calls in the TUI code, likely in a file handling session start, resume, switch, and title-change events. The change is to conditionally skip those writes based on a new environment variable (e.g., KIMI_CODE_DISABLE_TERMINAL_TITLE) or a tui.toml configuration key. Test by running the CLI with the flag set and verifying the terminal title is not overwritten.
Written by the indexing model from the issue text.
Description
What version of Kimi Code is running?
kimi --version: 2.0.2 (installed via Homebrew, /opt/homebrew/bin/kimi)
What platform is your computer?
macOS, Ghostty terminal (also relevant to tmux, WezTerm, iTerm2 — any terminal that displays OSC 0 in tab titles).
What feature would you like to see?
An official switch to disable the TUI's own terminal-title management, so a shell wrapper (or the user's own setup) can own the tab title.
Background: the TUI writes the session title (or the product name, before a title is generated) to the terminal via OSC 0 on session start, resume, session switch, and every session-title change. There is currently no env var, config.toml key, or tui.toml key to turn this off.
For comparison, Claude Code has CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 for exactly this purpose. Prior art on the other side: #1885 (open) proposes putting more state into the title — so a toggle would serve both camps: users who want the tab to say "kimi: " from their shell wrapper, and users who want a working-state spinner there.
Concrete use case: a fish wrapper around the kimi binary sets the Ghostty tab title to kimi: <dirname> (basename only, since titlebar tabs truncate from the right). Today the wrapper's title is overwritten within a second by the CLI's own OSC 0 write. With a switch, the wrapper sets the title once and nothing fights it; on exit the terminal's shell integration restores the cwd title at the next prompt.
Requested shape (any of these is fine):
- An env var, e.g.
KIMI_CODE_DISABLE_TERMINAL_TITLE=1(mirrors Claude's naming), or - a
tui.tomlkey, e.g.terminal_title = false(mirrors the shape requested in #1885, which suggested a tui.toml flag for its own titling).
Ideally the switch suppresses all OSC 0 writes from the TUI (updateTerminalTitle / setTitle call sites: session start, resume, switch, and title-change events).
What is the current workaround?
None that isn't fragile — the only option today would be racing or filtering the CLI's output, which isn't worth it. Until this exists, the wrapper approach is unusable.
Related
- #1885 — proposes mirroring working state into the terminal title (also asks for a tui.toml flag around titling).
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 12h 30m
- Merged PRs (30d)
- 339
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.
More from MoonshotAI/kimi-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
MoonshotAI/kimi-code#4008 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
MoonshotAI/kimi-code#3947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
MoonshotAI/kimi-code#3836 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MoonshotAI/kimi-code#3790 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
MoonshotAI/kimi-code#3755 ·
All issues in MoonshotAI/kimi-code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
receptron/mulmoterminal#2264 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
components-web-app/docs#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
simonsobs/tileviewer#114 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100