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
Web UI crashes when browsing folders in the project picker #22655
When using the web UI to add a new project, the entire opencode process crashes if you try to browse to or search for a folder that's more than a couple levels deep. This happens whether you click through directories one at a time or paste a full absolute path into the search box.
For example, trying to open something like ~/projects/org/repo will kill the process before you ever get a chance to select it.
It looks like the directory picker walks through every intermediate directory in the path and boots a full server instance for each one (with file watchers, file scanning, LSP, snapshots, etc). Browsing to a path 4 levels deep ends up creating 4+ instances concurrently, which on Linux can exhaust inotify watch limits or memory and take down the process.
The directory picker really only needs to list folder names to let you browse around. It shouldn't need all of that heavy initialization just to do the equivalent of readdir.
Steps to reproduce
Start opencode in web mode
Open the "Open Project" dialog
Type or paste a path that is 3 or more levels deep (e.g. ~/projects/org/repo)
Did some digging into what changed between v1.4.3 and v1.4.6 that could be causing this. There are two changes that together seem to be the culprit.
Ripgrep switched from a native binary to embedded WASM (d684086, landed in v1.4.4)
In v1.4.3, ripgrep ran as a native child process. Now it runs as WASM inside Bun Workers, meaning all the memory from concurrent scans lives inside the main process. When the directory picker boots multiple instances at once (one per path segment), all those ripgrep scans share the same memory space instead of being isolated OS processes. Much easier to OOM.
Bootstrap was parallelized (94f71f5 + 548d9ac, landed in v1.4.4/v1.4.5)
In v1.4.3, instance bootstrap was sequential. Plugin init, then LSP, then File, then FileWatcher, etc. Now all 8 services (including ripgrep file scanning, file watchers, LSP, snapshots) are fork-detached in parallel via Effect.all. So each browsed directory fires off everything at once, and when the picker is walking through multiple directories, you end up with a huge number of concurrent operations all fighting for resources.
Put those two together and browsing 3+ levels deep means 3+ instances booting simultaneously, each launching 8 parallel services including in-process WASM ripgrep scans. On Linux this can blow past inotify limits or exhaust memory and kill the process.
Activity
JtMotoX commentedon Apr 15, 2026
Update: downgrading to v1.4.3 resolves this. The crash started somewhere between v1.4.3 and v1.4.6.
JtMotoX commentedon Apr 16, 2026
Did some digging into what changed between v1.4.3 and v1.4.6 that could be causing this. There are two changes that together seem to be the culprit.
Ripgrep switched from a native binary to embedded WASM (d684086, landed in v1.4.4)
In v1.4.3, ripgrep ran as a native child process. Now it runs as WASM inside Bun Workers, meaning all the memory from concurrent scans lives inside the main process. When the directory picker boots multiple instances at once (one per path segment), all those ripgrep scans share the same memory space instead of being isolated OS processes. Much easier to OOM.
Bootstrap was parallelized (94f71f5 + 548d9ac, landed in v1.4.4/v1.4.5)
In v1.4.3, instance bootstrap was sequential. Plugin init, then LSP, then File, then FileWatcher, etc. Now all 8 services (including ripgrep file scanning, file watchers, LSP, snapshots) are fork-detached in parallel via
Effect.all. So each browsed directory fires off everything at once, and when the picker is walking through multiple directories, you end up with a huge number of concurrent operations all fighting for resources.Put those two together and browsing 3+ levels deep means 3+ instances booting simultaneously, each launching 8 parallel services including in-process WASM ripgrep scans. On Linux this can blow past inotify limits or exhaust memory and kill the process.
evatths commentedon Jun 3, 2026
This is still a problem, right? I can't open projects more than 2 layers deep.
StephanDollberg commentedon Jul 10, 2026
Yes it is.
github-actions commentedon Sep 9, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.