Problem
When running kimi inside the VS Code integrated terminal (via Remote-SSH), scrolling the mouse wheel or dragging the terminal panel causes the TUI view to jump back to the top of the conversation (the first message). The problem does not occur in external terminals (Windows Terminal, iTerm2, etc.), and it does not occur with opencode in the same VS Code terminal.
The issue worsens as the session grows longer — short sessions are barely affected, long sessions (many turns, large tool outputs) trigger the jump on almost every scroll/drag.
Environment
- kimi-code:
0.29.1
- Node:
v24.15.0
- Platform:
linux/x64 (Ubuntu 26.04, Remote-SSH)
- VS Code:
1.130.0 (TERM_PROGRAM=vscode), connecting via vscode-server
- Shell:
/bin/bash, TERM defaults to xterm-256color in the integrated terminal
Reproduction
- Open VS Code, connect to a remote host via Remote-SSH.
- Open an integrated terminal (`Ctrl+``).
- Start
kimi and have a conversation with several turns (5+), ideally including tool calls with non-trivial output.
- Scroll the mouse wheel up/down, or drag the terminal panel border to resize.
- The view jumps to the top of the conversation.
Root cause analysis
From inspecting the binary, kimi-code's TUI uses:
- Alternate screen buffer (full-screen mode)
- Mouse tracking (
enableMouse() — mouse events are sent to the app instead of scrolling the terminal scrollback)
In this combination, VS Code's integrated terminal forwards the wheel event to kimi, which triggers a re-render and re-anchors the cursor/view to the content output point (top of conversation). This is a known interaction problem between VS Code's terminal renderer and full-screen TUI apps that capture mouse events.
Problem
When running
kimiinside the VS Code integrated terminal (via Remote-SSH), scrolling the mouse wheel or dragging the terminal panel causes the TUI view to jump back to the top of the conversation (the first message). The problem does not occur in external terminals (Windows Terminal, iTerm2, etc.), and it does not occur withopencodein the same VS Code terminal.The issue worsens as the session grows longer — short sessions are barely affected, long sessions (many turns, large tool outputs) trigger the jump on almost every scroll/drag.
Environment
0.29.1v24.15.0linux/x64(Ubuntu 26.04, Remote-SSH)1.130.0(TERM_PROGRAM=vscode), connecting via vscode-server/bin/bash, TERM defaults toxterm-256colorin the integrated terminalReproduction
kimiand have a conversation with several turns (5+), ideally including tool calls with non-trivial output.Root cause analysis
From inspecting the binary, kimi-code's TUI uses:
enableMouse()— mouse events are sent to the app instead of scrolling the terminal scrollback)In this combination, VS Code's integrated terminal forwards the wheel event to kimi, which triggers a re-render and re-anchors the cursor/view to the content output point (top of conversation). This is a known interaction problem between VS Code's terminal renderer and full-screen TUI apps that capture mouse events.