anomalyco / anomalyco/opencode

Slow startup / long loading time every time the OpenCode desktop app is launched (30+ seconds before the UI becomes usable)

Open
#41,477 1 comment 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 10, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

Every time I open the OpenCode desktop application on Windows, it takes a very long time to load before the interface becomes usable. The delay is consistently reproducible on each launch — it is not a one-time cold-start cost. I'm looking for confirmation of the root cause and suggestions to reduce startup latency.

Environment
Item Value
OS Windows 11 (win32), PowerShell 5.1 as default shell ("shell": "pwsh")
OpenCode config C:\Users\14540\.config\opencode\opencode.json
Model opencode-go/deepseek-v4-flash
LSP enabled ("lsp": true)
Snapshot disabled ("snapshot": false)
Workspace D:\Code\编程语言学习 (static site, ~28 MB total)
Startup-related inventory (collected from the machine)

These are the load-bearing items that execute or are scanned on every startup:

1. Skills — 144 skill directories are scanned

  • ~/.config/opencode/skills: 35 skills
  • ~/.claude/skills: 33 skills
  • ~/.agents/skills: 76 skills (including a large Azure suite)
  • The global AGENTS.md instructs that the full skill catalog be evaluated on every conversation.

2. Plugins — 4 plugins loaded

  • opencode-supermemory
  • opencode-notify
  • @tarquinen/opencode-dcp
  • oh-my-opencode-slim
  • Plugin dependency footprint: ~/.config/opencode/node_modules79.8 MB

3. MCP servers — all enabled

  • oh-my-opencode-slim.json sets mcps: ["*", "!context7"] on the orchestrator preset, meaning every configured MCP server is started at launch (network connections, handshakes, etc.).

4. Global config surface

  • opencode.json with custom permission rules, LSP enabled, watcher with ignore patterns
  • Multiple plugin config backups in the same directory (6 oh-my-opencode-slim.json.bak*, 7 opencode.json.bak*) — cosmetic, not a load factor, but noted
  • autoUpdate: true in oh-my-opencode-slim; supermemory also announced an update (v2.0.10 → v2.0.11) during the session, suggesting update checks happen at startup

5. Data / cache directories

  • ~/.local/share/opencode: 151.8 MB (includes log/, repos/, snapshot/, storage/, tool-output/, auth.json, opencode.db + opencode.db-shm + opencode.db-wal)
  • ~/.cache/opencode: ~1.7 GB (1,701.9 MB)
  • Note: the workspace project itself is small (node_modules 19 MB, dist 4.8 MB, total 27.9 MB), so project size is likely not the bottleneck.
Suspected causes (in likely order of impact)
  1. Skill catalog scan — 144 skills across three directories are enumerated/parsed on every launch; the global AGENTS.md forces skill-catalog awareness on every session start.
  2. MCP server startup"*" enables all MCP servers, each requiring process spawn + connection handshake (some are network-bound).
  3. Plugin initialization — 4 plugins with an ~80 MB dependency tree; oh-my-opencode-slim performs update checks (autoUpdate: true) and preset resolution.
  4. LSP boot"lsp": true initializes language servers on startup for the workspace.
  5. Large cache/database — 1.7 GB cache and a 150 MB+ share directory (SQLite WAL files present) may add I/O cost during startup/db initialization.
  6. Desktop shell overhead — the desktop wrapper itself plus model endpoint connectivity check before the UI becomes interactive.
Requested help
  • Confirm which of the above dominates startup time (I can provide --log / verbose startup output if there is a recommended flag).
  • Advice on the cheapest wins, e.g.:
    • Pruning the skill directories or deferring skill scanning until first use
    • Tightening mcps from "*" to only the servers actually needed
    • Disabling autoUpdate / update checks at startup
    • Cleaning ~/.cache/opencode and compacting opencode.db WAL
    • Any documented startup profiling flag for the desktop app

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.