macOS desktop app white screen due to orphaned process accumulation #8577

Open
opened 2026-02-16 18:10:18 -05:00 by yindo · 2 comments
Owner

Originally created by @IanShaw027 on GitHub (Feb 5, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

The macOS desktop app experiences intermittent white screen issues during normal usage. This is caused by orphaned processes accumulating and consuming excessive memory.

Root Cause

The process cleanup code in packages/desktop/src-tauri/src/lib.rs uses killall opencode-cli, but the actual process name is opencode (not opencode-cli). This means orphaned processes are never cleaned up on app restart.

Symptoms

  • Multiple opencode, openwrk, and openwork-server processes accumulate over time
  • Memory usage grows significantly (observed 5 opencode processes consuming 1.3GB RAM)
  • WebView render process gets killed by system memory pressure
  • App shows white screen

Steps to Reproduce

  1. Use OpenWork desktop app on macOS for extended period
  2. Restart the app several times
  3. Check running processes: ps aux | grep -E "opencode|openwrk" | grep -v grep
  4. Observe multiple instances of each process type
  5. Eventually the app will white screen due to memory pressure

Expected Behavior

Old processes should be cleaned up when the app starts, leaving only one instance of each process type.

Environment

  • OS: macOS
  • App: OpenWork Desktop
Originally created by @IanShaw027 on GitHub (Feb 5, 2026). Originally assigned to: @adamdotdevin on GitHub. ## Description The macOS desktop app experiences intermittent white screen issues during normal usage. This is caused by orphaned processes accumulating and consuming excessive memory. ## Root Cause The process cleanup code in `packages/desktop/src-tauri/src/lib.rs` uses `killall opencode-cli`, but the actual process name is `opencode` (not `opencode-cli`). This means orphaned processes are never cleaned up on app restart. ## Symptoms - Multiple `opencode`, `openwrk`, and `openwork-server` processes accumulate over time - Memory usage grows significantly (observed 5 opencode processes consuming 1.3GB RAM) - WebView render process gets killed by system memory pressure - App shows white screen ## Steps to Reproduce 1. Use OpenWork desktop app on macOS for extended period 2. Restart the app several times 3. Check running processes: `ps aux | grep -E "opencode|openwrk" | grep -v grep` 4. Observe multiple instances of each process type 5. Eventually the app will white screen due to memory pressure ## Expected Behavior Old processes should be cleaned up when the app starts, leaving only one instance of each process type. ## Environment - OS: macOS - App: OpenWork Desktop
yindo added the perfweb labels 2026-02-16 18:10:18 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 5, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #11959: bug(desktop): orphaned opencode-cli processes on Linux after app exit - Similar orphaned process issue on desktop
  • #10563: Memory Leak: Orphaned processes when terminal closes without explicit exit - Orphaned processes consuming memory on macOS
  • #11527: OpenCode leaves an orphaned process when it itself is killed - General orphaned process problem across platforms

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 5, 2026): This issue might be a duplicate of existing issues. Please check: - #11959: bug(desktop): orphaned opencode-cli processes on Linux after app exit - Similar orphaned process issue on desktop - #10563: Memory Leak: Orphaned processes when terminal closes without explicit exit - Orphaned processes consuming memory on macOS - #11527: OpenCode leaves an orphaned process when it itself is killed - General orphaned process problem across platforms Feel free to ignore if none of these address your specific case.
Author
Owner

@Micpol commented on GitHub (Feb 8, 2026):

It's not only Desktop app, although I'm not 100% sure - i just noticed I have 40 orphaned opencode processes, I'm using mostly CLI through Android Studio + Ghostty, and opencode desktop for copying larger chunks of text If have to. It's 25gb ram total.

@Micpol commented on GitHub (Feb 8, 2026): It's not only Desktop app, although I'm not 100% sure - i just noticed I have 40 orphaned opencode processes, I'm using mostly CLI through Android Studio + Ghostty, and opencode desktop for copying larger chunks of text If have to. It's 25gb ram total.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8577