Repository navigation
Description
Bug: TUI freezes on blank screen at startup, no error, requires force-kill
Environment
- OpenCode version: 1.18.14 (also reproduced on 1.18.15)
- OS: macOS (Apple Silicon, M1 Max, 32GB)
- Terminal: Terminal.app (default macOS terminal)
- Install method: official install script (curl -fsSL https://opencode.ai/install | bash)
Description
Launching opencode in a normal project directory results in a completely blank screen. The process starts successfully, loads all config files without any error, then hangs silently before rendering the TUI. No error, no panic, no output — it simply never proceeds past initialization. The process must be force-killed (Cmd+Q / killall -9); Ctrl+C does not respond.
Confirmed not caused by:
- Project or global config content (reproduced with config file removed/restored, and with a
autoupdate: falsekey added — no change in behavior) - Local plugins (reproduced with
~/.config/opencode/pluginand~/.opencode/pluginmoved out of the way) - Version — same freeze occurs on both 1.18.14 and 1.18.15
- Terminal state — reproduced after a full
reset, after quitting and reopening Terminal.app in a fresh, larger window, and after clearing~/.cache/opencodeand~/.local/share/opencode
Log output (--print-logs)
timestamp=2026-08-08T14:39:07.233Z level=INFO run=d9dbd7f1 message="creating instance" directory=/Users/vevertluisant
timestamp=2026-08-08T14:39:07.234Z level=INFO run=d9dbd7f1 message=fromDirectory directory=/Users/vevertluisant
timestamp=2026-08-08T14:39:07.334Z level=INFO run=d9dbd7f1 message=bootstrapping directory=/Users/vevertluisant
timestamp=2026-08-08T14:39:07.338Z level=INFO run=d9dbd7f1 message=loading path=/Users/vevertluisant/.config/opencode/config.json
timestamp=2026-08-08T14:39:07.339Z level=INFO run=d9dbd7f1 message=loading path=/Users/vevertluisant/.config/opencode/opencode.json
timestamp=2026-08-08T14:39:07.339Z level=INFO run=d9dbd7f1 message=loading path=/Users/vevertluisant/.config/opencode/opencode.jsonc
timestamp=2026-08-08T14:39:07.362Z level=INFO run=d9dbd7f1 message=loading path=/Users/vevertluisant/.opencode/opencode.json
timestamp=2026-08-08T14:39:07.362Z level=INFO run=d9dbd7f1 message=loading path=/Users/vevertluisant/.opencode/opencode.jsonc
[--- nothing logged for 2m33s ---]
timestamp=2026-08-08T14:41:40.980Z level=INFO run=d9dbd7f1 message="disposing all instances"
The last log line before the freeze is the final config-file load (.opencode/opencode.jsonc). Nothing is logged between that line and the forced shutdown 2 minutes 33 seconds later — the hang happens after config loading completes and before any TUI/render-related log line appears.
Steps to reproduce
- Open Terminal.app on macOS (Apple Silicon)
cd ~(or any project directory)- Run
opencode - Screen stays blank indefinitely; Ctrl+C does nothing; process must be force-killed
Expected behavior
TUI renders normally after config loading, as it has in prior sessions on this same machine/config.
Additional context
- After a forced kill, the terminal is sometimes left emitting raw ANSI mouse-tracking codes (
;NNMNNsequences) untilprintf '\e[?1000l\e[?1002l\e[?1003l\e[?1006l\e[?1049l\e[0m'+resetis run — consistent with known mouse-reporting cleanup issues on force-exit. opencode --versionandopencode --helpwork fine, confirming this is isolated to TUI initialization, not the binary itself.
Activity
github-actions commentedon Aug 8, 2026
This issue might be a duplicate of existing issues. Please check:
sethen commentedon Aug 9, 2026
Same thing here
lingengyuan commentedon Sep 22, 2026
Another macOS repro today (1.18.30), this time after resuming a large session rather than a fresh
opencodelaunch. Same end state as the OP: blank/white TUI, no log error, keystrokes (including quit) ignored, onlykill -9recovers.Repro
opencode -s ses_f37f75a4cffeL4fagJyNraDOyB # session was already large: 8,295 parts / 124 messages / ~32k eventsPrevious instance of that session had been killed earlier (likely OOM-adjacent — see #50578). Reloading it produced:
S+, 0.1–0.5% CPU, RSS ~2.5 GBrun=37b3e4a4)message="booting location services" directory=...sample, 2s)kevent64(event-loop wait, not a busy spin)/dev/ttys000, but no key handlingPRAGMA integrity_check→okBoot sequence matches this issue: config loads →
init count=56→ watcher →booting location services→ silence. A healthy run of the same directory continues within ~12s tocommand/loop/ session work; this run never got there.Why this repro matters
The blank freeze here is preceded by an immediate multi-GB RSS spike on session resume (25 MB of parts → ~2.2 GB RSS in ~33 s). Heap analysis and vmmap for that path are in #50578. Plausible link: heavy resume allocation / layout work leaves the TUI before the first paint or before the input loop is fully live, so the process sits idle in
kevent64with nothing drawn and no keybind handling.Related: #44337 (empty frames on Apple Silicon), #32560 / #35494 (blank startup hang), #50578 (resume RSS spike + heap snapshots).
Environment
Happy to re-run with
--print-logs/ take a fresh heap snapshot if that helps.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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊