[Feature Request] Allow PreToolUse hooks to suppress inline diff display in terminal

Resolved 💬 2 comments Opened Apr 1, 2026 by stefanfinseth Closed May 8, 2026

Feature request:
Allow hooks to suppress inline diff display in terminal

I'm building an external diff viewer TUI (claude-diff-socket) that connects to Claude Code via PreToolUse hook on Edit/Write tools. The hook streams the proposed diff to my app over a Unix domain socket, where I review and approve/reject it.

The problem: when I approve the edit in my external viewer, Claude Code still renders the full inline diff in the terminal. This is redundant — I've already reviewed the diff in a purpose-built viewer with better UX (syntax highlighting, tabbed navigation, intra-line diffs, etc.).

Proposed solution: Allow PreToolUse hook output to include a field like "suppressDiff": true (or "skipTerminalDiff": true). When present and the hook approves the edit, Claude Code would skip rendering the inline diff in the terminal, trusting that the external tool already handled the review.

Why this matters: The hook system is great for building external review tooling, but the inability to control terminal output makes the experience feel duplicated. This would make hooks a first-class integration point for external diff viewers, code review tools, and similar workflows.

Worth noting: this behavior already exists for IDE integrations. When connected via /ide to VS Code or JetBrains, Claude Code sends diffs to the IDE's native diff viewer and suppresses the terminal inline diff. The proposed suppressDiff hook output field would extend this same capability to custom tooling — letting any external diff viewer built on the hook system achieve the same seamless experience that first-party IDE integrations already provide.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.81
  • Feedback ID: 02e93865-cb93-4c95-97fa-e4ff3e411e3c

View original on GitHub ↗

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