Add a way to collapse/hide the Edit/Write diff preview in the interactive terminal UI

Status Closed — duplicate
Maintainer reply None cached
Activity 2 comments · opened Aug 15, 2026 · closed Aug 20, 2026

Title: Add a way to collapse/hide the Edit/Write diff preview in the interactive terminal UI

Problem

When Claude Code performs an Edit/Write tool call in interactive mode (e.g. inside the
VS Code integrated terminal), it prints the full diff of the changed file — including
surrounding context lines — directly into the terminal. For large files or long single-line
entries (e.g. a markdown table row), this diff block can span dozens of visual lines even
though the actual change is small.

This makes it hard to follow the session, especially when:

  • The terminal window is narrow (long lines wrap heavily).
  • Several edits happen in a row, pushing the assistant's actual text response far up and

out of view.

  • The user mainly cares about the assistant's summary, not the raw diff (they can already

inspect the file directly, or via git diff, if they want the full change).

What I checked

There's currently no setting to control this:

  • settings.json has no relevant key.
  • No CLI flag (e.g. under --output-format) affects it in interactive mode.
  • /output-style and /config don't expose a toggle for it either.

Proposed solution

Add a setting (e.g. "editDiffPreview": "full" | "summary" | "hidden" in settings.json,
or a /config toggle) that controls how much of an Edit/Write diff is rendered inline:

  • full (current behavior) — unchanged, full diff with context.
  • summary — one line per edit, e.g. Edit(path/to/file.md) — 1 line changed, similar to

how the tool result summary already looks for some other tools.

  • hidden — no diff output at all; the user can still inspect changes via their editor or

git diff.

A per-session /diff-preview <full|summary|hidden> slash command would also work if a
persistent setting is out of scope.

Alternatives considered

  • Filtering the terminal output externally (e.g. a wrapper script) — not viable since the

CLI renders an interactive TUI with ANSI control codes, not plain line-based stdout;
filtering risks corrupting the display.

  • Just writing shorter diffs (e.g. shorter file lines) — helps a little but doesn't address

the root cause, and isn't always possible (e.g. editing an existing long line in a file
the user doesn't control the format of).

Environment

  • Claude Code CLI, interactive mode, run inside the VS Code integrated terminal on Windows.

View original on GitHub ↗

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