Skip to content

Joowonoil/claude-code-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Claude Code Cleanup Tool

Update (2025-01-25): This issue appears to be fixed in Claude Code v2.1.19. Update with brew upgrade claude. Keep this tool just in case the issue resurfaces.

A temporary workaround for the Claude Code orphan process issue on macOS.

Problem

When closing terminal applications (iTerm2, PyCharm, etc.) without explicitly exiting Claude Code, processes become orphaned and continue running in the background, consuming significant memory.

Symptoms

  • Multiple claude processes visible in Activity Monitor
  • High memory usage (can reach several GB)
  • Processes persist even after closing all terminals

Usage

Option 1: Double-click (macOS)

  1. Download claude_cleanup.command
  2. Double-click to run
  3. Follow the on-screen prompts

Option 2: Terminal

# Kill all Claude processes
pkill -9 claude

Prevention

Until the bug is fixed, properly exit Claude Code before closing the terminal:

  • Type /exit in Claude Code
  • Or press Ctrl+C then Ctrl+D
  • Or press Ctrl+D twice

Note

This is a temporary workaround. Once issue #17391 is resolved, this tool will no longer be necessary.

About

Temporary cleanup tool for Claude Code orphan processes on macOS (issue #17391)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages