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
tui: crashes with ENOSPC when inotify watch limit is exhausted #51208
The TUI crashes on startup with ENOSPC: no space left on device, watch '.../state/opencode/next/tui' when the host's fs.inotify.max_user_watches limit is exhausted (this is not an actual disk-space issue). packages/tui/src/context/storage.tsx calls raw fs.watch() with no try/catch. fs.watch throws synchronously when inotify_add_watch fails, so the exception propagates straight through Solid's render and kills the whole app instead of just disabling live-reload.
Reproducible on demand on a host with enough long-running processes holding inotify watches (editors, LSPs, other opencode instances watching a big repo). Elsewhere in the codebase (core/src/config/plugin/skill.ts's ConfigSkillPlugin.watch), the same failure is caught and logged instead of crashing.
I have a fix ready (wraps the watch() call in try/catch, logs and disables live-reload instead of crashing) and will open a PR referencing this issue.
OpenCode version
0.0.0-next-17444 (also reproduced against v2.0.16 / current v2 tip - same code path)
Steps to reproduce
On a host, exhaust fs.inotify.max_user_watches (e.g. run several long-lived file watchers, or enough editors/LSPs/opencode instances against a big repo).
Start a new opencode TUI session.
TUI crashes immediately with ENOSPC: no space left on device, watch '.../state/opencode/next/tui'.
Activity
Tarquinen commentedon Oct 20, 2026
This was fixed by #51210 and #51243. Those PRs merged into the
v2branch, so GitHub didn't close this issue automatically. Closing as completed.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊