Repository navigation
[Bug] opencode serve: multiple instances sharing ~/.config/opencode and ~/.local/share/opencode lose sessions and show broken MCP status after v1.15.11 #30302
Description
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 serveon/path/to/project-a(a git repo with remote origin) - Run a second
opencode serveon/path/to/project-b(a different local copy of the same git repo) - Both use the default shared
~/.local/share/opencodeand~/.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
- [Bug] The second identical project does not open in another tab after the update. #29962 "The second identical project does not open in another tab" (closed as not planned, same root cause)
- Desktop/WebUI: New sessions not shown in sidebar when connected to non-localhost server on same machine #19348 "New sessions on non-localhost server assigned to local server context"
- Title: Desktop sidebar hides sessions where session.version = 'local' #27539 "Desktop sidebar hides sessions where session.version = 'local'"
- [BUG][Windows][Web/Desktop] Session sidebar uses path-sensitive exact matching (slash + drive-case), causing hidden sessions and duplicate workspaces #14570 "Session sidebar uses path-sensitive exact matching" (fixed, but similar pattern)
- MCP servers #27771 "All local stdio MCP servers show red/unavailable on Desktop"
- MCP Subsystem entirely unresponsive on Windows Desktop App (/config loads, but /mcp times out) #16449 "MCP subsystem entirely unresponsive on Desktop"
- fix(mcp): MCP status shows connected green after server reconnect even though server is down #24855 "MCP status falsely shows green after reconnect"
- MCP Docker servers fail to connect after upgrade from v1.1.6 to v1.1.7+ #8171 "MCP Docker servers fail to connect after upgrade"
Activity
github-actions commentedon Aug 1, 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.