[Feature Request] Emit OSC prompt markers for terminal prompt navigation (Ghostty jump_to_prompt)

Resolved 💬 3 comments Opened Mar 2, 2026 by aphamm Closed Mar 6, 2026

Feature Request

Terminals like Ghostty support jump_to_prompt keybindings (e.g. Cmd+Shift+Up/Down) that let you hop between shell prompts. This works by detecting OSC escape sequences (shell integration prompt markers) that the shell emits at each prompt.

Since Claude Code is a full-screen TUI, it doesn't emit these markers — so terminal-level prompt navigation doesn't work inside a Claude Code session.

Proposal

Have Claude Code emit OSC prompt markers (e.g. OSC 133) at each user input prompt. This would allow terminals like Ghostty, iTerm2, and WezTerm to recognize where each user message starts, enabling native prompt jump navigation through the conversation.

This would make it easy to scroll back through a long session and jump directly between your own messages.

Context

  • Ghostty's jump_to_prompt:-1 / jump_to_prompt:1 actions rely on these markers
  • iTerm2 and WezTerm also support shell integration via the same OSC sequences
  • Currently the only way to review past messages is manual scrolling or the rewind selector (Esc Esc)

View original on GitHub ↗

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