Repository navigation
Description
Description
After sending one message and getting a reply, opencode crashes and the TUI shows Worker has been terminated. The session becomes unusable and I have to restart. It happens on every conversation, right after the first interaction.
I narrowed it down: the crash still happens with --pure (no plugins/MCP), outside tmux, and with OPENCODE_DISABLE_MOUSE=1. So it's not plugins, the terminal, or mouse handling.
The macOS crash report points at a native crash, not a UI bug:
- Exception:
EXC_BREAKPOINT (SIGTRAP) - Faulting thread:
HTTP Client(not the render worker)
So the bundled Bun runtime traps on the HTTP client thread after the first network round-trip, the whole process dies, and the opentui render worker goes down with it — which is what surfaces as Worker has been terminated.
I checked the bundled Bun version across releases by extracting the opencode-darwin-arm64 binaries:
| opencode | bundled Bun | result |
|---|---|---|
| ≤ 1.15.4 | 1.3.13 | works |
| 1.15.5 → 1.17.7 | 1.3.14 | crashes |
current dev build |
1.3.14 | still crashes |
Downgrading to 1.15.4 (Bun 1.3.13) fixes it. Anything on Bun 1.3.14 crashes. This lines up with the known Bun 1.3.14 SIGTRAP problem on macOS 26 / Apple Silicon (see #31563, #32544, upstream oven-sh/bun#32144) — but here it's a runtime crash during HTTP activity, not just the crash-on-exit those issues describe.
Plugins
Reproduces with --pure (no plugins). My normal config uses opencode-openai-codex-auth + a small local notification plugin, but disabling everything does not help.
OpenCode version
1.17.7 (also confirmed crashing on the current dev build, which still ships Bun 1.3.14)
Steps to reproduce
- macOS 26.x on Apple Silicon, opencode 1.17.7
opencode --pure- Send any single message and wait for the reply
- Crash: TUI shows
Worker has been terminated; a~/Library/Logs/DiagnosticReports/opencode.exe-*.ipsis written withEXC_BREAKPOINTon theHTTP Clientthread npm install -g [email protected](Bun 1.3.13) → no longer crashes
Screenshot and/or share link
Crash report excerpt:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Termination: Trace/BPT trap: 5
Faulting thread: HTTP Client
Operating System
macOS 26.5.1 (build 25F80), Apple M4 Pro (arm64), installed via npm
Terminal
Reproduces regardless of terminal (tested inside and outside tmux; TERM=tmux-256color and a plain terminal both crash)
Activity
ryanseddon commentedon Jun 17, 2026
This issue has been plaguing me for the last few days.
Whenever I try to view a subagent via crtl + x down it consistently crashes with the worker terminated error. Trying to resume the session just shows the error, if I restart the session and continue if I do the subagent viewing it crashes again.
I have opencode: 1.17.8.
mdrv commentedon Jun 20, 2026
I also kept getting
Worker has been terminatedon v1.17.x on subsequent prompts and had to restart every time. OpenCode v1.16.x has been fine (on Arch Linux). I believe it's a regression that can only be fixed on source side.Update: Fixed in v1.17.10 (no more terminated worker error/rejection).
rober-tm commentedon Jun 21, 2026
I've had the same bug since all versions of 1.17.x. I tried each one to see if it would be fixed, but no luck. The only stable version is 1.16.2. I'm on Ubuntu Server 24. Any alternative solutions or patches?
ryanseddon commentedon Jun 21, 2026
Ive got a fork here with a fix that would be worth trying. It fixes the issue for me on macOS ryanseddon@ca3eeee
mdrv commentedon Jun 21, 2026
@ryanseddon Your fork didn't fix the issue for me (on Linux); still blocked with
Worker has been terminatederror message on second prompt. Should I create a new issue?[-]opencode crashes (SIGTRAP on HTTP Client thread) after first message — bundled Bun 1.3.14 on macOS 26 / Apple Silicon[/-][+]bug: Worker has been terminated[/+]Worker has been terminatedafter backend worker RPC error on MacOS #33269 as a duplicate of this issuemisterdojo777 commentedon Jun 22, 2026
confirmed bug for me as well: downgrading to 1.16.0(or 1) fixed the issue so it's somewhere introduced after this. I think it has to do with the new background sub-agents since the little TUI element (
ctrl+b-> move sub-agent to the background) was broken.rober-tm commentedon Jun 23, 2026
I installed version 1.17.9 and the error persists on Ubuntu Linux 24.04.4, using opencode connected via SSH with the Windows terminal (PowerShell).
ryanseddon commentedon Jun 24, 2026
Confirmed that 1.17.9 is also still doing the worker has been terminated error for me.
My fork with a fix is the one that works without error for me.
rekram1-node commentedon Jun 24, 2026
the fix hasnt released yet.