Skip to content

Server overwhelmed by concurrent project bootstraps when many sidebar projects exist #17407

@BYK

Description

@BYK

Description

When the web UI loads with many sidebar projects (e.g. 17 directories under ~/Code), all projects bootstrap concurrently. Each bootstrap spawns 5-7 subprocesses (git, ripgrep, parcel/watcher), resulting in ~100 simultaneous subprocesses that overwhelm the event loop and saturate I/O on modest hardware (4-core, SATA SSD).

Additionally, Filesystem.exists() wraps existsSync() in an async function — it looks async but blocks the event loop on every call. This prevents the server from responding to health checks and API requests while directory walk-ups are in progress.

Steps to reproduce

  1. Configure OpenCode with 15+ sidebar projects
  2. Start opencode serve
  3. Open the web UI
  4. Observe slow/unresponsive UI — health checks timeout, API routes are delayed

OpenCode version

1.2.26

OS

Linux (also affects macOS, Windows)

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)perfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions