Closed feature request

Suggestion: help the workspace cope with memory pressure (froze ~14 min, pane went blank, then recovered)

Drew Owens · 15d ago ·closed by Kyle Bergstedt

Sharing this as a suggestion, not as a bug. Everything recovered on its own, but it might be worth a look.

What I saw: On Oct 26, the VS Code pane went blank after a "Reload Session" dialog (screenshot). It came back about 14 minutes later.

What the workspace logs suggest happened

  • At 17:05 local, a Claude thread in the workspace ran a TypeScript type check plus npm test. That ran alongside 3 Claude processes, 2 extension hosts and Codex, in a workspace with 5.8 GB of RAM and no swap.
  • Memory got tight and the kernel thrashed rather than OOM-killing anything. The 5-minute memory pressure (PSI) peaked at about 44% "some" and 30% "full". The Claude extension logged event-loop stalls of up to 32 s, with high major-fault counts and very little CPU. code-server logged No ptyHost heartbeat from 17:06. The journal has nothing from 17:10 to 17:19, and a 3 s hygiene unit took 9 minutes to finish.
  • At 17:19:14, code-server was cleanly restarted (NRestarts=0, no crash), probably by Hydrogen's recovery or the Reload click. That killed the stuck test (exit 137), and everything came back healthy.

Ideas, in case they're useful

  1. A small swap or zram device in the workspace machine, so heavy builds slow down instead of freezing everything.
  2. Keeping code-server responsive under memory pressure, for example with MemoryLow=/OOMScoreAdjust= on code-server, or a MemoryHigh= cap on the user slice that AI-run jobs land in.
  3. A larger default RAM size, or making it configurable when the Mac has plenty. This Mac has 24 GB, and the workspace gets 5.8 GB.
  4. A hint in the pane when Hydrogen detects memory pressure, such as "workspace is low on memory", instead of a blank view.

Environment: Hydrogen for macOS 0.1.420 (public, stable), Apple Silicon, 24 GB Mac. Workspace: 4 vCPU, 5.8 GB RAM, no swap.

Reported by Drew (drew715). @kyle FYI, these are macOS workspace suggestions.

7

1 Reply

Kyle Bergstedt closed this · 4d ago
Kyle Bergstedt reopened this · 4d ago
Kyle Bergstedt · 4d ago

fixed in 0.1.429-dev.12: swap in the vm, the vm gets half of ram leaving macos 8 gb (24 gb mac → 12 gb, was 6), code-server and its extension hosts are oom-protected while ai shells reset to normal, and a webview macos kills is reloaded. doctor shows oom kills

Kyle Bergstedt closed this · 4d ago

Log in to reply.