Skip to content

Repository files navigation

Claude Code Scroll

npm license

A properly scrollable transcript viewer for Claude Code sessions — as a VS Code extension (this repo root), a plain-terminal CLI wrapper (cli/), and a Claude Code plugin (plugin/) that fixes it from inside a session.

Claude Code's own terminal UI and VS Code panel have long-standing, widely reported scrolling problems: the alternate-screen renderer wipes native terminal scrollback, the mouse wheel gets captured as arrow-key/history navigation, and auto-scroll yanks you back to the bottom while you're trying to read something above. See: #28077, #34845, #37387, #42002, #42670, #51393, #66833, #68732.

If you're in the plain CLI, Claude Code already has a built-in fix — run /tui default to switch out of the alternate-screen renderer into one that uses native terminal scrollback, without losing your conversation. It also saves that choice for future sessions. The plugin in this repo mostly exists to make that command, and /config's Auto-scroll toggle, discoverable and to run them for you the moment you say scrolling is broken, instead of you finding this out from a GitHub issue thread.

If you're in VS Code specifically, the extension panel has its own, separate bug (input focus steals scroll events, unrelated to the CLI's alternate-screen issue) with no first-party fix yet. This repo's VS Code extension doesn't try to patch Claude Code's own panel rendering (a third-party extension can't reach into another extension's webview). Instead it reads the same session transcript Claude Code already writes to ~/.claude/projects/**/*.jsonl and renders it in its own panel, with scrolling that just works:

  • Live-updating transcript in the sidebar, matched to your current workspace folder.
  • Auto-scroll that isn't aggressive — it only follows new messages if you were already at the bottom; scroll up to read history and it stays put.
  • Filter box to jump to a part of a long session.
  • Collapsed tool calls/results by default so a long session doesn't turn into a wall of JSON.
  • One command, "Claude Code Scroll: Fix Terminal Scrollback", that sets CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 for VS Code's integrated terminal, addressing the CLI-side scrollback bug too.

Install

Search "Claude Code Scroll" in the Extensions view, or grab it from the VS Code Marketplace / Open VSX Registry (Cursor, Windsurf, VSCodium).

Not using an editor at all? Try /tui default first (see above — it's built into Claude Code and needs nothing installed). cli/ is a claude-scroll command, published on npm — npx claude-code-scroll (or npm install -g claude-code-scroll) — for non-interactive or scripted use where there's no session to run a slash command in.

Already inside a Claude Code session? Install the plugin and just ask — it also triggers automatically the moment you complain about scrolling:

/plugin marketplace add founderneeds/claude-code-scroll
/plugin install claude-code-scroll@claude-code-scroll

How it works

Claude Code writes one append-only JSONL file per session under ~/.claude/projects/<encoded-workspace-path>/<session-id>.jsonl. This extension finds the most recently modified session file for your current workspace, parses the user/assistant message entries, and watches the file for changes — no connection to Claude Code itself, so it works whether you're driving Claude Code from the CLI, the VS Code panel, or another editor entirely.

License

MIT

About

Properly scrollable Claude Code transcripts — VS Code sidebar panel + a claude-scroll CLI wrapper. Fixes the known alternate-screen/mouse-capture scrollback bugs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages