Describe the bug
Stale .devenv-wrap processes persist after VS Code terminal sessions end, each consuming 100-150% CPU. They are not cleaned up when the terminal session is interrupted, when VS Code is quit, or after stopping devenv services manually.
On my MacBook Air M5 (macOS, aarch64-darwin), I discovered three such processes running simultaneously after roughly two weeks of normal use:
PID COMMAND %CPU TIME
3583 .devenv-wrap 144.2 16:06:49
96920 .devenv-wrap 144.0 31:13:34
51030 .devenv-wrap 125.0 13:57:12
Combined, they consumed ~400% CPU continuously, with PID 96920 having accumulated 31 hours of CPU time. This caused severe battery drain — under 2 hours of battery life on a machine that should comfortably get 8+ hours. The processes were only discovered by running top -o cpu; they were not obvious in Activity Monitor's standard app view.
A killall .devenv-wrap cleared them, and they did not respawn after reboot, which suggests they are orphaned rather than being relaunched by a supervisor.
To reproduce
I'm unable to provide a minimal reproduction because I'm not a developer and I'm not sure what specifically triggered the orphaning. I can describe my usage pattern in case it helps narrow it down:
- I use
devenv inside VS Code's integrated terminal.
- Typically 1-2 VS Code windows open at a time, with one terminal per window.
- When I finish working with a service or process, I stop it with Ctrl+C in the terminal.
- I sometimes keep VS Code open for extended periods (across days) rather than quitting it fully between sessions.
- I do not explicitly run any devenv cleanup command on session end.
Claude's hypothesis is that something about long-lived VS Code sessions, terminal interrupts (Ctrl+C), or both, can leave the .devenv-wrap wrapper process orphaned. Over time, these accumulate and consume significant CPU.
My hypothesis is that Claude Code opens the shell when testing and then doesn't shut it down.
I'm happy to provide any additional diagnostic information if you can tell me what to capture next time it happens.
Version
devenv 2.1.1+a3ebee0 (aarch64-darwin)
Describe the bug
Stale
.devenv-wrapprocesses persist after VS Code terminal sessions end, each consuming 100-150% CPU. They are not cleaned up when the terminal session is interrupted, when VS Code is quit, or after stopping devenv services manually.On my MacBook Air M5 (macOS, aarch64-darwin), I discovered three such processes running simultaneously after roughly two weeks of normal use:
Combined, they consumed ~400% CPU continuously, with PID 96920 having accumulated 31 hours of CPU time. This caused severe battery drain — under 2 hours of battery life on a machine that should comfortably get 8+ hours. The processes were only discovered by running
top -o cpu; they were not obvious in Activity Monitor's standard app view.A
killall .devenv-wrapcleared them, and they did not respawn after reboot, which suggests they are orphaned rather than being relaunched by a supervisor.To reproduce
I'm unable to provide a minimal reproduction because I'm not a developer and I'm not sure what specifically triggered the orphaning. I can describe my usage pattern in case it helps narrow it down:
devenvinside VS Code's integrated terminal.Claude's hypothesis is that something about long-lived VS Code sessions, terminal interrupts (Ctrl+C), or both, can leave the
.devenv-wrapwrapper process orphaned. Over time, these accumulate and consume significant CPU.My hypothesis is that Claude Code opens the shell when testing and then doesn't shut it down.
I'm happy to provide any additional diagnostic information if you can tell me what to capture next time it happens.
Version
devenv 2.1.1+a3ebee0 (aarch64-darwin)