[BUG] Agent tool leaks Electron renderer processes

Resolved 💬 2 comments Opened May 28, 2026 by Tiny-xx Closed Jun 1, 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?

Description

When using Claude Code via cc-connect on Windows 10 for extended periods (a full workday with frequent sub-agent and Shell tool invocations), the process count explodes due to unrecycled "Git for Windows" processes.

Observed behavior

  • After ~8 hours of use (frequent Agent + Shell tool calls): 21,541 processes, system becomes unresponsive, Task Manager freezes
  • After a fresh reboot and ~2 more hours of use: 5,000+ processes, all named "Git for Windows" (git.exe / bash.exe / sh.exe child processes)
  • Each Shell/Bash tool invocation appears to spawn new Git for Windows child processes that are never cleaned up
  • The leak forces a hard reboot when the system becomes too slow to even open Task Manager

Expected behavior

Shell/Bash tool child processes should be terminated when the command completes. They should not accumulate over the session lifetime.

Steps to reproduce

  1. Use Claude Code via cc-connect on Windows 10
  2. Run many Shell/Bash commands and Agent tool calls over several hours
  3. Open Task Manager → sort by process name → observe hundreds/thousands of "Git for Windows" entries

Environment

  • OS: Windows 10 Pro (build 19045)
  • Claude Code: cc-connect mode
  • Git: Git for Windows (installed at C:\Program Files\Git\)
  • Shell environment: Bash (via Git for Windows) + PowerShell 7

Severity

Critical — renders the machine unusable, requires hard reboot. Makes long work sessions impossible.

What Should Happen?

Shell/Bash tool child processes should be terminated and cleaned up after each command completes, rather than accumulating indefinitely over the session.

Error Messages/Logs

Steps to Reproduce

Steps to reproduce

  1. Use Claude Code via cc-connect on Windows 10
  2. Run many Shell/Bash commands and Agent tool calls over several hours
  3. Open Task Manager → sort by process name → observe hundreds/thousands of "Git for Windows" entries

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.140

Platform

Other

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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