Hint text corrupts statusline output containing links

Resolved 💬 5 comments Opened Dec 15, 2025 by max-sixty Closed Mar 1, 2026

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

  1. Hint injected mid-statusline: The hint text appears inside the custom statusline output instead of being handled separately by Claude Code.
  1. 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.
  1. 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)

  1. 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'"
}
}
``

  1. Start Claude Code
  1. Wait for a hint to appear (e.g., "ctrl-g to edit prompt in Vim")
  1. Observe that the hint text appears in the middle of the statusline output instead of being displayed separately
  1. Notice that the OSC 8 hyperlink URL ("trunk/pull/199") leaks into the visible output
  1. 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)

  1. Install worktrunk from PR branch:

``bash
cargo install --git https://github.com/max-sixty/worktrunk --branch statusline-link
``

  1. Add statusline hook to ~/.claude/settings.json:

``json
{
"hooks": {
"Status": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "wt list statusline --claude-code"
}
]
}
]
}
}
``

  1. Navigate to a git repo with a GitHub PR that has CI status
  1. Start Claude Code and wait for a hint to display
  1. 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

https://github.com/max-sixty/worktrunk/pull/199

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗