MCP servers disabled with /mcps reconnect after an idle Location eviction
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 225k
- Forks
- 30.4k
- Merge médio
- 4h 16min
- PRs com merge (30d)
- 528
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de anomalyco/opencode
-
reproduced
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 61/100
anomalyco/opencode#62873 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
anomalyco/opencode#62822 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
anomalyco/opencode#62601 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
reproduced
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
anomalyco/opencode#62516 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
anomalyco/opencode#62374 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de anomalyco/opencode
Issues semelhantes
-
bug chore
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
🧩 Docs job fails type-checking `generate-plugin-docs.ts`Talvez já em andamento @X-Guardian assumiu hoje. Abertadiscussion
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
envision-erpnext
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
bug sharing & sync
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
Mantenedores costumam responder em até 1 dia