Description
Running multiple opencode serve instances that share the same ~/.config/opencode and ~/.local/share/opencode directories (the default setup — no custom --config flag) no longer works correctly after v1.15.11. This is the expected configuration for serve mode on a server, including Docker containers that bind-mount the user home config/state dirs.
Two distinct symptoms:
1. Sessions disappear from sidebar (project identity deduplication)
When two serve instances run on different local copies of the same git remote repository, one instance's sessions vanish from the sidebar. Opening the duplicate project shows it for ~0.1s then it disappears. This was introduced by v1.15.11's "Remote-backed projects now resolve a stable project identity" — the shared SQLite DB now deduplicates projects by remote identity instead of filesystem path, so the second instance's project identity collides with the first.
See also #29962 (closed as "not planned" without considering serve mode), #19348, #27539, #14570.
2. MCP server status is stale/cross-contaminated
MCP servers defined in the shared opencode.json show incorrect status across instances. One instance starts a Docker MCP server, the other shows it as green (but it's unreachable) or red (but it's running). This is a stale cached state in the shared MCP process tracking.
See also #27771, #16449, #24855, #8171.
Expected Behavior
Multiple opencode serve instances sharing the same config and state directories should each correctly:
- Show their own sessions in the sidebar, keyed by filesystem path not remote identity
- Display correct MCP server status independently
- Not collide on project identity deduplication
Actual Behavior
After v1.15.11:
- Second copy of same-remote project disappears from sidebar ("project appears for 0.1 second and then disappears")
- MCP servers show stale/incorrect status across instances
Steps to Reproduce
- Run
opencode serve on /path/to/project-a (a git repo with remote origin)
- Run a second
opencode serve on /path/to/project-b (a different local copy of the same git repo)
- Both use the default shared
~/.local/share/opencode and ~/.config/opencode
- Observe: sessions from step 2 do not appear in the sidebar, or appear briefly then vanish
- Configure Docker-based MCP servers in the shared config
- Observe: MCP status shows incorrect state across instances
Environment
- opencode v1.15.11+
- Ubuntu Server (Docker containers)
- Shared bind-mounted home directories
- Default config/state dirs (no --config flag)
Related Issues
Description
Running multiple
opencode serveinstances that share the same~/.config/opencodeand~/.local/share/opencodedirectories (the default setup — no custom--configflag) no longer works correctly after v1.15.11. This is the expected configuration for serve mode on a server, including Docker containers that bind-mount the user home config/state dirs.Two distinct symptoms:
1. Sessions disappear from sidebar (project identity deduplication)
When two serve instances run on different local copies of the same git remote repository, one instance's sessions vanish from the sidebar. Opening the duplicate project shows it for ~0.1s then it disappears. This was introduced by v1.15.11's "Remote-backed projects now resolve a stable project identity" — the shared SQLite DB now deduplicates projects by remote identity instead of filesystem path, so the second instance's project identity collides with the first.
See also #29962 (closed as "not planned" without considering serve mode), #19348, #27539, #14570.
2. MCP server status is stale/cross-contaminated
MCP servers defined in the shared
opencode.jsonshow incorrect status across instances. One instance starts a Docker MCP server, the other shows it as green (but it's unreachable) or red (but it's running). This is a stale cached state in the shared MCP process tracking.See also #27771, #16449, #24855, #8171.
Expected Behavior
Multiple
opencode serveinstances sharing the same config and state directories should each correctly:Actual Behavior
After v1.15.11:
Steps to Reproduce
opencode serveon/path/to/project-a(a git repo with remote origin)opencode serveon/path/to/project-b(a different local copy of the same git repo)~/.local/share/opencodeand~/.config/opencodeEnvironment
Related Issues