You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Orphan processes remain after closing terminal (iTerm/PyCharm) #20586
When closing the terminal application (iTerm2, PyCharm terminal) without explicitly exiting Claude Code, the Claude processes become orphaned and continue running in the background, consuming significant memory.
Steps to Reproduce
Open Claude Code in iTerm2 or PyCharm terminal
Use Claude Code normally
Close the terminal window or quit the application directly (without running /exit or Ctrl+C)
Check Activity Monitor or run ps aux | grep claude
Expected Behavior
Claude Code processes should terminate when the parent terminal is closed.
Actual Behavior
Claude processes continue running as orphan processes. Over time (days), dozens of processes accumulate, consuming significant memory (observed 3.4GB+ for a single process, with 20+ orphan processes total).
Example from ps aux:
username 63707 100.2 10.1 515016720 3397904 ?? R 금07오전 43:07.66 claude
username 63462 10.2 0.6 509344192 204832 ?? S 금07오전 69:49.41 claude
username 73132 7.8 0.6 510144016 196144 ?? S 금09오전 59:50.86 claude
... (20+ more processes from previous days)
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
github-actions commentedon Jan 24, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
github-actions commentedon Jan 29, 2026
This issue has been automatically closed as a duplicate of #17391.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code
github-actions commentedon Feb 6, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.