Emit OSC 133 escape sequences to mark prompts
Resolved 💬 3 comments Opened May 31, 2025 by frangio Closed Dec 7, 2025
Many terminals now support commands and keybindings to navigate shell prompts as marked by OSC 133 escape sequences.
- Ghostty: https://ghostty.org/docs/config/keybind/reference#jump_to_prompt
- Kitty: https://sw.kovidgoyal.net/kitty/shell-integration/
- PowerShell: https://learn.microsoft.com/en-us/windows/terminal/tutorials/shell-integration#powershell-pwshexe
- VS Code: https://code.visualstudio.com/docs/terminal/shell-integration
- Neovim: https://neovim.io/doc/user/terminal.html#terminal-osc133 (where I got some of the links above)
A spec can be found here but the gist is:
The start of a prompt is marked by sequenceOSC 133 ; A ST, and the end byOSC 133 ; B ST.
(Again copied from Neovim docs.)
Claude Code could mark prompts in this way to make it easier to navigate the chat.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗