ACP: first prompt can miss MCP tools supplied to session/new (2.0.18 / 2.0.22)
Los mantenedores suelen responder en 1 día
@kitlangton ya está trabajando en esto.
Desde el 5/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Description
MCP tools supplied through ACP session/new can be absent from the first model-visible tool catalog, even after session/new has returned successfully. A later prompt in the same session sees them.
Reproduced on 2.0.18 and 2.0.22 on macOS arm64. Two independent 2.0.18 runs both showed: immediate prompt = tools absent; prompt after 500 ms = tools present. A diagnostic control that waits for actual tool registration makes the first prompt include them.
The diagnostic observer records tool registration and model context, then deliberately stops before provider dispatch. These observations do not require a model/API request. Native permissions were ask, with the test MCP namespace allowed.
Expected: the first prompt should use the tools supplied for that session without the ACP client needing an arbitrary sleep.
Suspected location in v2.0.22: packages/core/src/tool/mcp.ts debounces subsequent updates by 100 ms, but flush only awaits the initial registration. packages/core/src/session/context.ts then takes the tool snapshot. This appears to leave a readiness gap for MCP servers added by ACP; please confirm the diagnosis.
Plugins
Custom diagnostic observer only; separate control adds a tool-readiness wait. No third-party plugin pack.
OpenCode version
2.0.18 and 2.0.22
Steps to reproduce
- Start opencode acp with a clean runtime/config directory.
- Complete ACP initialize.
- Call session/new with an absolute cwd and a local stdio MCP server exposing two fixed tools. Allow this MCP namespace.
- Wait for the successful session/new response, then immediately call session/prompt.
- Inspect the model-visible tool catalog: the supplied MCP tools may be missing, while the registry logs show them arriving shortly afterward.
- Send another prompt in the same session after 500 ms: the tools are now present.
Control: wait for the supplied tools to enter the registry before preparing the first prompt; the first context then includes them. This control is a diagnostic workaround, not an upstream fix.
Screenshot and/or share link
No response
Operating System
macOS, Darwin 27.0.0, Apple Silicon arm64
Terminal
ACP stdio client launching opencode acp (not the TUI)
- Lenguaje dominante
- TypeScript
- Estrellas
- 212k
- Forks
- 28.1k
- Merge medio
- 9 h 58 min
- PR fusionados (30 d)
- 373
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de anomalyco/opencode
-
Windows: global-project session path depends on server process drive, hides API-created sessions from desktop pickerPosiblemente ocupada @1624318455 la tomó hace 11 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[FEATURE]: Test that PermissionV2 declines pending requests when its scope closesPosiblemente ocupada @saeedahmed96 la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
EffectFlock heartbeat never refreshes, so locks held over 60 s can be brokenPosiblemente ocupada @iceteaSA la tomó hace 12 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
anomalyco/opencode#51159 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
Signals (Failure Detector): a tool call and its own execution are reported as a repeated callAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
platformatic/mcp#208 ·
Los mantenedores suelen responder en 1 día
-
🐛 bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
margelo/react-native-vision-camera#4211 ·
Los mantenedores suelen responder en 4 días