[BUG] DEC private mode escape sequences leak as visible text in Ghostty (`[?630088]`, `[?630306]`)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
DEC private mode escape sequences emitted by Claude Code are rendered as visible text artifacts in Ghostty terminal. Multiple high-numbered private mode sequences leak into the visible output:
[?630088]— appears in the terminal output area[?630306]— appears in the status line / prompt area
These are CSI sequences (\e[?<number>h or \e[?<number>l) that Claude Code sends for terminal capability detection. Ghostty does not recognize these non-standard private mode numbers and renders them as literal text instead of silently discarding them.
This is similar to the previously reported (and closed) OSC color query leak (#12910), but involves DEC private mode set/reset sequences rather than OSC color queries.
Expected Behavior
These escape sequences should either:
- Not be emitted to terminals that don't support them (e.g., detect Ghostty and skip), or
- Be sent as proper queries (DECRQM) so the terminal can respond with "not recognized" rather than printing raw codes
How to Reproduce
- Open Ghostty terminal (macOS, latest stable)
- Run
claudeto start Claude Code - Interact normally — the
[?630088]and[?630306]sequences appear as visible text artifacts in the output
Environment
- Claude Code version: latest (installed via npm)
- Terminal: Ghostty (stable, macOS)
- OS: macOS (Darwin 25.2.0)
- Shell: zsh with Starship prompt
Ghostty Config (relevant)
shell-integration = zsh
shell-integration-features = cursor,sudo,title
Screenshots
The artifacts appear inline with terminal output, e.g.:
~ main [?630306] Opus 4.6 22% ctx 12:50This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗