MCP servers disabled with /mcps reconnect after an idle Location eviction
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
The report identifies MCP disconnect state being lost when a Location is evicted and rebuilt, and includes a scratch reproduction, but it names no source files or tests. Start by tracing Location service eviction and boot alongside the /mcps disable flow, then reproduce the reported disconnect → eviction → rebuild sequence. Done means disabled servers stay disconnected after rebuilding the Location, without breaking config-based startup.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
Disabling MCP servers with /mcps is undone after a Location is evicted and rebuilt. On 2.2.6 the log still shows location services evicted, then on the next request location services booted and mcp connected for every server I had disabled, with a new connectionID. A rebuilt Location initializes MCP from config only, so the runtime disconnect is discarded.
This also kills stateful local stdio MCP servers: rea keeps its project in memory, so the next call starts a new process and a 3–4 hour analysis has to be redone.
This is not the 2.2.6 shutdown-event bug from #60668; that stops MCP events during shutdown, but the next boot still reconnects. It is also not #13763 (V1 restart, closed not planned). #57902 is the same mechanism for ACP-added servers, but an ACP fix would re-add those servers, not preserve a /mcps override.
I reproduced it in the v2.2.6 source (tag dc2ffcf) with a scratch test: MCP.disconnect → status "disabled", close the Location scope as eviction does, rebuild → status "connected" and a second mcp connected with a new connectionID.
Plugins
opencode-loop (from ~/.config/opencode/plugins), not MCP-related.
OpenCode version
2.2.6 (tested at tag v2.2.6 / dc2ffcf; also reproduced on 2.2.5)
Steps to reproduce
- Configure a stateful local stdio MCP server (in my case
reawithnpx -y [email protected] mcp) plus other MCP servers. - Open /mcps and disable all of them.
- Use a stateful tool in a session (e.g. rea.open_binary + rea.binary_overview).
- Leave the location idle for more than 60 minutes (or run /reload).
- Send another prompt and check the log.
Screenshot
2026-11-08T23:30:04 location services evicted ...\Downloads\reatests
2026-11-09T09:39:15 location services booted ...\Downloads\reatests
2026-11-09T09:39:28 mcp connected server=rea tools=229 ... connectionID=0a3bd776-d518-4706-9807-460ac6eca116
Operating System
Windows 10
Terminal
Windows Terminal
- Lingua principale
- TypeScript
- Stelle
- 225k
- Fork
- 30.4k
- Merge medio
- 4h 16m
- PR unite (30g)
- 528
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di anomalyco/opencode
-
reproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
anomalyco/opencode#62873 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/opencode#62822 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
anomalyco/opencode#62601 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
reproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/opencode#62516 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
anomalyco/opencode#62374 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di anomalyco/opencode
Issue simili
-
code-quality good-first-issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OpenRailAssociation/netzgrafik-editor-frontend#1481 ·
I maintainer di solito rispondono entro 1 giorno
-
🙌 icon request
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
lucide-icons/lucide#5183 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
cloudflare/capnweb#293 ·
I maintainer di solito rispondono entro 2 giorni
-
bug implicit-state
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
area:models enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno