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
{{ message }}
Repository navigation
Worker's uncaughtException and unhandledRejection handlers are empty, so worker crashes leave no trace #47113
Registering a handler suppresses Node's default behaviour — print the stack, exit non-zero — so an empty one turns a worker crash into silence. Nothing is written to the log, and the TUI keeps talking to a worker that may be gone.
#42885 covers the RPC path (a throwing handler, a killed worker), but it doesn't touch these two handlers, so a failure that never crosses the RPC boundary stays invisible.
Logging the error before returning would be enough — synchronously, since the process may be about to exit. In a build where the handler does that, the one crash it caught over several weeks was Error: EIO: i/o error, write, which is otherwise lost entirely.
Happy to open a PR if that's welcome.
Steps to reproduce
In packages/opencode/src/cli/tui/worker.ts, add setTimeout(() => { throw new Error("boom") }, 4000) before the process.on calls.
Run bun dev .
After 4 seconds: the TUI is still up, boom appears nowhere — not on stdout, not in the log directory.
Activity
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊