anomalyco / anomalyco/opencode

Desktop: silent abort before window creation when sidecar utilityProcess.fork fails

Open
#49,562 0 comments 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Sep 17, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Description

Desktop won't open on Windows: no window, no error, nothing in the Windows Event Log. main.log stops here every time:

[info]   sidecar connection started { version: 'v1' }
[info]   spawning sidecar { url: 'http://127.0.0.1:58427' }

No loading task finished, no server ready, and no utility.log / server.log at all. Crashpad catches a 0x80000003 abort on the main thread ~250ms in.

The sidecar's own log (~/.local/share/opencode/log/opencode.log) has entries only for the launches that worked — its first line (loading path=...config.json) never appears for a failed one. So utilityProcess.fork() is failing at process creation and the child never runs any code.

The reason nothing is shown is in app.asar:

const { listener, health } = yield* Effect.promise(
  () => spawnLocalServer(hostname, port, password, { ... }))
...
yield* Fiber.await(loadingTask)       // waits for sidecar
const windows = restoreMainWindows()  // window created only after

Effect.promise turns the rejection into an unrecoverable defect, so forwardInitializationFailure never sees it, and the window doesn't exist yet to show anything.

Two suggestions: use Effect.tryPromise so a failed spawn is a handled error, and log the rejection to main.log before dying — right now the one useful piece of information is the only thing never written anywhere.

My specific trigger was environment-dependent (shell-activated launches get a __COMPAT_LAYER=DetectorsAdminProtection compat shim, which is inherited by the forked child; 0/3 launches from Start/Search vs 23/23 from a shell). Workaround is pointing the shortcut at explorer.exe with the exe as its argument. But the trigger matters less than the handling — I suspect several existing "desktop won't start / sidecar died" reports are different causes behind this same silent abort.

Plugins

None (global config is only $schema)

OpenCode version

1.18.31 (Desktop)

Steps to reproduce
  1. Install OpenCode Desktop 1.18.31 on Windows 11.
  2. Launch it from the Start menu / Windows Search / desktop shortcut.
  3. Main process aborts ~250ms after spawning sidecar; no window is ever shown.
  4. Launching the same exe from a shell works reliably.

Step 2 is only a reliable trigger on a machine where the shell applies the compat shim. To force the general failure on any machine, make utilityProcess.fork() fail — the point is that the app dies silently rather than reporting it.

Screenshot and/or share link

n/a — no UI is ever displayed, so there is nothing to capture.

Operating System

Windows 11 Pro 25H2, build 26200.9445

Terminal

n/a (desktop app)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.