Skip to content
← Back to release · 2.1.269
New features / v2.1.269

Show a diff of Bash file edits

CHANGELOG · original

Added a diff of the files a Bash command changed to the Bash tool result when the Bash tool handles file edits (setting bashEditDiffEnabled)
Open official changelog ↗

Documentation

Documentation excerpt

bashEditDiffEnabled

Choose whether Claude Code records which files changed in a Git repository while a Bash command runs. When it records them, you see their diff in the terminal after the command, and your PostToolUse Bash hooks receive the changed-file list.

A listed file isn't always one the command changed. A change that another program or another Bash call made while the command ran can appear there too.

Set the key to true to record them in every permission mode. Requires Claude Code v2.1.269 or later.

  • Scope: User or managed. A true counts only from your user settings, JSON passed with --settings, or managed settings, so a true in a repository's .claude/settings.json or .claude/settings.local.json can't turn the recording on. A false in either repository file still turns it off unless a higher-precedence file sets true.
  • Type: Boolean
  • Default: unset, so Claude Code records changes in auto mode and bypassPermissions mode when it directs Claude to edit files through Bash
  • Per-session overrides: CLAUDE_CODE_BASH_EDIT_DIFF takes precedence over this key for one session
{
  "bashEditDiffEnabled": true
}

Documentation snapshot · 2026-09-23

Change details