Hint text corrupts statusline output containing links
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?
Observed behavior
When Claude Code displays a hint (e.g., "ctrl-g to edit prompt in Vim"), the hint text is injected into the middle of the custom statusline output rather than being displayed separately. This corrupts the status line and causes display artifacts on subsequent keypresses.
~/w/worktrunk.statusline-link !?↑|🤖 @+131 -21 ↑3 ^+55 -29 ctrl-g to edit prompt in Vimtrunk/pull/199\●\
Expected (hint should not appear inline):
~/w/worktrunk.statusline-link !?↑|🤖 @+131 -21 ↑3 ^+55 -29 ●
The hint "ctrl-g to edit prompt in Vim" appears mid-statusline, followed by part of the OSC 8 hyperlink URL ("trunk/pull/199") leaking into visible output.
Symptoms
- Hint injected mid-statusline: The hint text appears inside the custom statusline output instead of being handled separately by Claude Code.
- OSC 8 hyperlink URL leaks: Part of the hyperlink URL ("trunk/pull/199") becomes visible text, indicating the OSC 8 escape sequence is being split or corrupted.
- Display corruption on keypress: Each keypress causes the line to redraw incorrectly, suggesting cursor position tracking is off.
What Should Happen?
Claude Code should display hints (such as "ctrl-g to edit prompt in Vim") separately without injecting them into the custom statusline. The hint should be shown in a designated area (e.g., below the statusline or in the UI) without corrupting ANSI escape sequences or OSC 8 hyperlinks in the statusline output.
The statusline should display correctly as:
~/w/worktrunk.statusline-link !?↑|🤖 @+131 -21 ↑3 ^+55 -29 ●
With the hint displayed separately, and no URL leakage into the visible output.
Error Messages/Logs
Steps to Reproduce
Minimal reproduction (no dependencies)
- Add this to
~/.claude/settings.json:
``json``
{
"statusLine": {
"type": "command",
"command": "printf '\\033[0m ~/w/worktrunk.statusline-link \\033[36m!\\033[39m\\033[36m?\\033[0m\\033[2m↑\\033[22m\\033[2m|\\033[22m🤖 @\\033[32m+131\\033[0m \\033[31m-21\\033[0m \\033[32m↑3\\033[0m ^\\033[32m+55\\033[0m \\033[31m-29\\033[0m \\033[4m\\033[32m\\033]8;;https://github.com/max-sixty/worktrunk/pull/199\\033\\\\\\\\●\\033]8;;\\033\\\\\\\\\\033[0m\\n'"
}
}
- Start Claude Code
- Wait for a hint to appear (e.g., "ctrl-g to edit prompt in Vim")
- Observe that the hint text appears in the middle of the statusline output instead of being displayed separately
- Notice that the OSC 8 hyperlink URL ("trunk/pull/199") leaks into the visible output
- On subsequent keypresses, the line redraws incorrectly, showing cursor position tracking is off
Note: This minimal repro demonstrates the hint injection and URL leaking, but does not cause the terminal line corruption on keypress that the full wt command does.
---
Full reproduction (with worktrunk tool)
- Install worktrunk from PR branch:
``bash``
cargo install --git https://github.com/max-sixty/worktrunk --branch statusline-link
- Add statusline hook to
~/.claude/settings.json:
``json``
{
"hooks": {
"Status": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "wt list statusline --claude-code"
}
]
}
]
}
}
- Navigate to a git repo with a GitHub PR that has CI status
- Start Claude Code and wait for a hint to display
- Observe hint text appearing inside the statusline output
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.69
Claude Code Version
2.0.69 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗