[PR #12238] fix(desktop): fix macOS orphaned process cleanup on startup #14131

Closed
opened 2026-02-16 18:18:56 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12238

State: closed
Merged: No


Fixes #12240

Summary

Fix orphaned process cleanup on macOS that was causing white screen issues due to memory accumulation.

Problem

The previous implementation used killall opencode-cli which doesn't match the actual process name (opencode). This caused:

  • Orphaned processes accumulating across app restarts
  • Memory leak (observed 5 opencode processes consuming 1.3GB RAM)
  • WebView white screen when system memory pressure kills the render process

Solution

  • Use pkill -f to match processes by full path instead of process name
  • Clean up all three process types: opencode, openwrk, openwork-server

Changes

  • packages/desktop/src-tauri/src/lib.rs: Replace killall opencode-cli with pkill -f commands for all OpenWork processes
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12238 **State:** closed **Merged:** No --- Fixes #12240 ## Summary Fix orphaned process cleanup on macOS that was causing white screen issues due to memory accumulation. ## Problem The previous implementation used `killall opencode-cli` which doesn't match the actual process name (`opencode`). This caused: - Orphaned processes accumulating across app restarts - Memory leak (observed 5 opencode processes consuming 1.3GB RAM) - WebView white screen when system memory pressure kills the render process ## Solution - Use `pkill -f` to match processes by full path instead of process name - Clean up all three process types: `opencode`, `openwrk`, `openwork-server` ## Changes - `packages/desktop/src-tauri/src/lib.rs`: Replace `killall opencode-cli` with `pkill -f` commands for all OpenWork processes
yindo added the pull-request label 2026-02-16 18:18:56 -05:00
yindo closed this issue 2026-02-16 18:18:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14131