claude-code - 💡(How to fix) Fix [BUG] Agent tool leaks Electron renderer processes

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Error Message

  • 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

Root Cause

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.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

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

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING