[BUG] Claude Desktop crashes when diff between main and the other branch is too big

Resolved 💬 3 comments Opened Feb 17, 2026 by milos-u Closed Feb 20, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I have a GIT repo where there is a master branch (the old branch) and the main branch (the current one).

Due to some old configuration the master was still the HEAD and the diff between master and main was like 3 mio lines.

Due to auto discovery Claude Desktop tried at startup to do a diff between current branch in the directory (main) and the HEAD, which resulted in:

  • git command returning 3.8 milion lines of unified diff
  • this resulted in excessive allocation of cca 4 GB in claude sub-process
  • and the final result was crash of Claude Desktop with freeze / blank screen

This issue started to apper cca 2 weeks ago after Claude Desktop update that added a new feature - pretty printing relationships between main and working directory tree branch.

Workaround:

In my case the fix was to propery set the main branch:
$ git config --local init.defaultBranch main
$ git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main

What Should Happen?

Claude should not parse the whole output of commands like:

$ git diff -M --no-color d8d97e1aa9fc80526b1807c9137d3c612ff50470|wc -l
3802536

It should only somehow count the lines instead.

Error Messages/Logs

./claude 

(node:37716) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `claude --trace-deprecation ...` to show where the warning was created)

$ (node:37716) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
Error sending from webFrameMain:  Error: Render frame was disposed before WebFrameMain could be accessed
    at s.send (node:electron/js2c/browser_init:2:103618)
    at b.send (node:electron/js2c/browser_init:2:88039)
    at Object.dispatchVisibilityChanged (C:\Users\milosu\AppData\Local\AnthropicClaude\app-1.1.3189\resources\app.asar\.vite\build\index.js:7:199219)
    at Hx (C:\Users\milosu\AppData\Local\AnthropicClaude\app-1.1.3189\resources\app.asar\.vite\build\index.js:318:60592)
    at BrowserWindow.<anonymous> (C:\Users\milosu\AppData\Local\AnthropicClaude\app-1.1.3189\resources\app.asar\.vite\build\index.js:921:59439)
    at BrowserWindow.emit (node:events:520:35)
    at o.emit (C:\Users\milosu\AppData\Local\AnthropicClaude\app-1.1.3189\resources\app.asar\.vite\build\index.pre.js:26:6197)
    at f (C:\Users\milosu\AppData\Local\AnthropicClaude\app-1.1.3189\resources\app.asar\.vite\build\index.js:921:62357)
    at BrowserWindow.<anonymous> (C:\Users\milosu\AppData\Local\AnthropicClaude\app-1.1.3189\resources\app.asar\.vite\build\index.js:921:62434)
    at BrowserWindow.emit (node:events:520:35)

Steps to Reproduce

Create a git branch with diff against the main branch with 3 milion lines of unified diff output.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude 1.1.3189 (1b7b58) 2026-02-14T00:09:46.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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