← Claude Code Hub
✦ Tip #191 Sep 8, 2026

Claude Code diff panel: stop asking what changed and watch it live

In a wide enough terminal, /diff no longer takes over the prompt: it docks beside the conversation and refreshes on every edit. And what you select in it goes with your next question.

Three terminal-width bands: under 110 columns the classic viewer, 110 to 143 the panel if you open it, and from 144 the panel opening on its own beside the conversation

TL;DR At 110 columns inside a git repo, /diff docks a panel beside the conversation that refreshes on every edit. Ctrl+X B changes what it compares against. And if it stopped showing up on its own, you closed it once: type /diff again and the habit comes back.

The loop is always the same. Claude says it's done, you ask what it touched, Claude summarises, and you take the summary on trust. Or you open another tab and run git diff, which is the same thing with more steps.

Since v2.1.260 there's a third option you don't have to ask for: /diff leaves the changes sitting next to the conversation and keeps them current while you work.

One command, two different interfaces

/diff doesn't do the same thing everywhere, which is why its own description changes. In fullscreen, inside a git repo, with a terminal 110 columns or wider, it opens a panel that stays. Not everyone is on fullscreen (it is still a research preview): type plain /tui to see which renderer you are in, and /tui fullscreen to switch without losing the conversation. Miss any of the three conditions and /diff falls back to the viewer you already know, the one that takes over the prompt and closes when you're done reading: that's the one with the per-turn tabs, and it hasn't gone anywhere.

The difference isn't cosmetic. The viewer is a stop: you quit typing, you look, you come back. The panel is a companion: it lists the changed files with their + and - counts, shows each file's diff underneath, and refreshes every time Claude edits a file or runs a shell command.

 conversation                    │  DIFF · session                   ✕
 ───────────────────────────     │  ──────────────────────────────────
 > fix the logout                │  src/auth/session.ts      +12  −3
                                 │  src/auth/login.ts         +4  −1
 · Edit(src/auth/session.ts)     │  ─────────────────────────────────
 · Edit(src/auth/login.ts)       │  @@ session.ts
                                 │  -  return token
 Done. Session cleanup now       │  +  await revoke(token)
 goes through revoke().          │  +  return null
                                 │
                                 │  2 test files hidden

(Illustrative preview: it's a terminal interface, so I can't capture it from here.)

It opens by itself, and it stays closed too

This is the part that catches people out. The panel shows up on its own as soon as Claude starts editing, provided your terminal is 144 columns or wider. Once you've opened it yourself with /diff, the bar drops: from then on it appears as soon as Claude edits a file, in any terminal wide enough to hold it.

It works the other way round as well. Close it and it stays closed. Not just for that session: for all of them, until you type /diff again. That decision lives in your ~/.claude.json:

{
  "diffSidebarOpen": false
}

Mine reads false, which is exactly why I hadn't seen the thing appear in weeks. I closed it once in a hurry and concluded the panel wasn't meant for my terminal. If that's you, there's nothing to configure: type /diff once and the habit is back.

What it compares against, and what it's hiding

By default the panel shows what changed in this session. Ctrl+X B cycles through three bases, and Claude Code remembers your pick per project:

Base What you see
Session (default) Only what has changed since you opened this session
Uncommitted Your whole working tree, the git diff HEAD view
Branch Everything since your branch split off the default one

And the list is deliberately incomplete. It skips test files and generated files, and it collapses everything that changed before this session into a single line at the bottom. Both are counted and both expand on a click, so nothing is truly hidden, but it's worth knowing that what you see first has been filtered.

Point at the lines and ask about them

The part you'll use most once you find it: select lines in the panel with the mouse and Claude Code attaches them to your next prompt, with a line count next to the input until you send. No more describing where the problem is or pasting the snippet by hand. You highlight the three odd lines and type "why this".

To move around: clicking a file's row jumps to its diff, the mouse wheel scrolls the panel, and when the file list itself won't fit, Alt+↑ and Alt+↓ (or Ctrl+↑ and Ctrl+↓) walk through it.

When it won't open

If /diff doesn't give you the panel, it falls back to the viewer or tells you why, with these two messages:

Resize your terminal to at least 110 columns to show the diff panel

The diff panel shows git changes — the current directory isn't in a git repository

There's a third state that isn't your fault:

Diff unavailable
Couldn't read the git diff — it will retry on the next change

That one shows up when it couldn't read the diff at that moment. Nothing to fix: the panel retries on the next change by itself.

Looking isn't auditing. The panel shows you what happened; when you want someone to hunt for the mistakes in it, that's /code-review over your diff.

Official docs: Review changes with /diff

Requirements

  • Claude Code v2.1.260 or later, the fullscreen renderer (/tui fullscreen), a git repo and a terminal at least 110 columns wide. Checked on v2.1.263.
Workshop for teams

Multiply your team's output without sacrificing quality: a 6 to 8 hour AI First workshop, online, on the Claude platform.

See the workshop
Free guide

The 51 essentials, as a PDF.

One page per tip. Five chapters. What I actually use daily in production — no theory, no fluff.

  • I. Getting started 10 tips
  • II. Awareness 3 tips
  • III. Mastery 22 tips
  • IV. Autonomy 10 tips
  • V. Comparison 6 tips
Are you a professional Web developer?

You'll receive the guide by email · You join the Gravitas newsletter · Unsubscribe anytime

of 51
#

Wmedia · 51 Tips
Free guide · 51 tips · 5 chapters

The 51 essentials, as a PDF.

Are you a professional Web developer? · Unsubscribe anytime