You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report, and sorry about the trouble with updates. We need a bit more detail before we can look into it:
The exact error you get after updating: the full message, a screenshot or the relevant log output.
Your OpenCode version (opencode --version), and the version you updated from if you know it.
How you installed OpenCode (npm, curl install script, Homebrew, desktop app, etc.) and how you update it.
Your operating system, and your terminal if the error shows up in the TUI.
What you were doing when the error appeared, e.g. on startup, when running a specific command or when sending a prompt.
Any plugins or custom config you use, since these sometimes break after an update.
If you've hit different errors across several updates, please describe the most recent one first. Separate problems are best filed as separate issues.
You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done editing.
Error: Desktop IPC handler failed
at cee (oc://renderer/assets/main-LkJVdThx.js:2:30745)
at see (oc://renderer/assets/main-LkJVdThx.js:2:30411)
at MessagePort. (oc://renderer/assets/main-LkJVdThx.js:2:29128)
at MessagePort.i (oc://renderer/assets/esm-BnYEL-oC.js:15:6665)
────────────────────────────────────────
Causado por:
{
"name": "UnknownError",
"message": "An error occurred in Effect.tryPromise",
"cause": {
"name": "Error",
"message": "Background service failed to start"
}
}
Thanks for the error output. It shows the OpenCode Desktop app (v2) can't start its local background service. "Background service failed to start" is a generic message, though, so the real cause isn't in this output yet. To narrow it down, could you share:
The OpenCode Desktop version (shown in the updater or About screen), and the version you had before the update if you know it.
Your operating system and version (e.g. Windows 11 23H2, macOS 15).
The debug logs: click Export Logs on the error screen. It saves an opencode-debug-<date>.zip file to your Downloads folder. Please attach it here, or paste the relevant part of the server log. Look through it first and remove anything private.
Whether it fails every time you open the app, or only when you reopen it right after closing it. Does it start working again after a reboot?
If you also have the opencode CLI installed in a terminal, the output of opencode service status and opencode service start.
These existing issues look related. The list is ordered by likelihood, so please check whether one of them already covers your problem:
启动报错 #51284: the exact same "Desktop IPC handler failed" / "Background service failed to start" error on Windows 11 when opening the app
桌面端打开报错,kill端口和set新端口都无法解决 #54071: the same desktop error, where the underlying cause was the service port (49374) already being in use
You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done editing.
Thanks for the debug logs, they showed what was going on. In your server log, the background service hung, the app restarted it several times, and one restart failed while starting up with SQLiteError: disk I/O error. That failed process never exited. It kept the service port, so every launch afterwards showed "Background service failed to start", even though the original problem may already have cleared.
I reproduced this on Linux with the 2.0.28 CLI. I couldn't test the desktop app or Windows here, but the failed state comes from the shared server code.
Start the background service once so the data directory exists, then stop it.
Corrupt the service database to force a startup error. opencode service start fails, but the serve --service process stays running.
Restore a working database and start again. It still fails with Background service failed to start every time, and opencode service status says stopped although the old process is still running.
This still happens on the latest dev (e9def88). The script below reproduces it.
Workaround: close OpenCode, then in Task Manager end any leftover opencode-cli.exe / opencode processes, or reboot, and open the app again. If you have the CLI, opencode service stop should also clear it.
Related: #54810 covers the slow startup and restart storm that probably caused the first failure. #54267 covers port conflicts on relaunch.
Reproduction script (repro.sh)
#!/usr/bin/env bash# Repro for anomalyco/opencode#55107: a background service whose boot fails# (here: SQLite error) stays alive holding the managed port in "failed" state,# so every later launch reports "Background service failed to start" even# after the cause is gone.## Usage: ./repro.sh # uses `opencode` from PATH# OC="bun ... /path/packages/cli/src/index.ts" ./repro.sh # from sourceset -u
OC=${OC:-opencode}export HOME=${REPRO_HOME:-/tmp/opencode/h55107}
rm -rf "$HOME"; mkdir -p "$HOME/.local/share/opencode"
D=$HOME/.local/share/opencode
cd"${REPRO_CWD:-$(mktemp -d)}"echo"== version: $($OC --version)"echo"== 1. normal start/stop to create the data dir"
timeout 90 $OC service start;$OC service stop >/dev/null 2>&1; sleep 2
echo"== 2. simulate a boot-time SQLite failure (author saw 'SQLiteError: disk I/O error')"
DB=$(ls "$D"/opencode*.db | head -1)# opencode.db (release) or opencode-local.db (source)
rm -f "$DB"-wal "$DB"-shm
head -c 8192 /dev/urandom >"$DB"
timeout 90 $OC service start;echo"exit=$?"
grep -h "background service boot failed""$D"/log/*.log | tail -1 | cut -c1-200
echo"service processes:"; pgrep -af "serve --service"| grep -v pgrep
echo"== 3. remove the cause (fresh DB) and launch again"
mv "$DB""$D/corrupt.db"foriin 1 2;do timeout 90 $OC service start 2>&1| head -1;doneecho"status: $($OC service status 2>&1| head -1)"echo"service processes (same PID still alive = bug):"; pgrep -af "serve --service"| grep -v pgrep
$OC service stop >/dev/null 2>&1; sleep 2; pkill -f "serve --service"2>/dev/null;true
I’m taking the failed-boot service cleanup. The server keeps its failed health endpoint alive, but both clients currently return the startup error without stopping that registered owner. I’m checking cleanup before returning that error while preserving the existing failed-health and registration ownership contracts.
Activity
opencode-agent commentedon Oct 13, 2026
Thanks for the report, and sorry about the trouble with updates. We need a bit more detail before we can look into it:
opencode --version), and the version you updated from if you know it.If you've hit different errors across several updates, please describe the most recent one first. Separate problems are best filed as separate issues.
You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done editing.
pixelcreatives commentedon Oct 13, 2026
Error: Desktop IPC handler failed
at cee (oc://renderer/assets/main-LkJVdThx.js:2:30745)
at see (oc://renderer/assets/main-LkJVdThx.js:2:30411)
at MessagePort. (oc://renderer/assets/main-LkJVdThx.js:2:29128)
at MessagePort.i (oc://renderer/assets/esm-BnYEL-oC.js:15:6665)
────────────────────────────────────────
Causado por:
{
"name": "UnknownError",
"message": "An error occurred in Effect.tryPromise",
"cause": {
"name": "Error",
"message": "Background service failed to start"
}
}
opencode-agent commentedon Oct 13, 2026
Thanks for the error output. It shows the OpenCode Desktop app (v2) can't start its local background service. "Background service failed to start" is a generic message, though, so the real cause isn't in this output yet. To narrow it down, could you share:
opencode-debug-<date>.zipfile to your Downloads folder. Please attach it here, or paste the relevant part of the server log. Look through it first and remove anything private.opencodeCLI installed in a terminal, the output ofopencode service statusandopencode service start.These existing issues look related. The list is ordered by likelihood, so please check whether one of them already covers your problem:
You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done editing.
pixelcreatives commentedon Oct 13, 2026
opencode-debug-20261013T200001.zip
opencode-agent commentedon Oct 13, 2026
Thanks for the debug logs, they showed what was going on. In your server log, the background service hung, the app restarted it several times, and one restart failed while starting up with
SQLiteError: disk I/O error. That failed process never exited. It kept the service port, so every launch afterwards showed "Background service failed to start", even though the original problem may already have cleared.I reproduced this on Linux with the 2.0.28 CLI. I couldn't test the desktop app or Windows here, but the failed state comes from the shared server code.
opencode service startfails, but theserve --serviceprocess stays running.Background service failed to startevery time, andopencode service statussaysstoppedalthough the old process is still running.This still happens on the latest
dev(e9def88). The script below reproduces it.Workaround: close OpenCode, then in Task Manager end any leftover
opencode-cli.exe/opencodeprocesses, or reboot, and open the app again. If you have the CLI,opencode service stopshould also clear it.Related: #54810 covers the slow startup and restart storm that probably caused the first failure. #54267 covers port conflicts on relaunch.
Reproduction script (repro.sh)
Run it:
bash repro.shDante-dan commentedon Oct 14, 2026
I’m taking the failed-boot service cleanup. The server keeps its failed health endpoint alive, but both clients currently return the startup error without stopping that registered owner. I’m checking cleanup before returning that error while preserving the existing failed-health and registration ownership contracts.
rekram1-node commentedon Oct 16, 2026
THis was fixed on latest desktop release there were some port conflict issues