Auto-terminate idle claude.exe processes on tab close / task completion
Description
When running Claude Code as a VS Code extension across multiple windows/tabs, each session's underlying claude.exe process stays resident in memory after its tab is closed or after a task finishes and the session goes idle. On a multi-window workflow this adds up fast — I observed 8 separate claude.exe processes simultaneously totaling ~1.2GB RAM, none of which were doing active work.
The current documented guidance is to manually "close and restart Claude Code between major tasks" to reclaim memory, which works but requires the user to notice and intervene each time.
Request
Add an option to automatically terminate (or at least release memory from) a claude.exe process when:
- its owning VS Code tab/panel is closed, and/or
- it has been idle (no active task, awaiting no further instruction) for a configurable timeout
Suggested shape: an idleTimeoutSeconds setting (0/disabled by default to preserve current fast-resume behavior for those who want it), so users who prioritize memory over resume speed can opt in.
Environment
- Claude Code as VS Code native extension
- Windows 11
- Multiple concurrent windows/sessions is the triggering scenario