Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ACP: first prompt can miss MCP tools supplied to session/new (2.0.18 / 2.0.22)

Aperta
#53,299 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@kitlangton ci sta già lavorando.

Dal 5/10/2026.

  • #54191 di @mathew-cf — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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
  1. Start opencode acp with a clean runtime/config directory.
  2. Complete ACP initialize.
  3. Call session/new with an absolute cwd and a local stdio MCP server exposing two fixed tools. Allow this MCP namespace.
  4. Wait for the successful session/new response, then immediately call session/prompt.
  5. Inspect the model-visible tool catalog: the supplied MCP tools may be missing, while the registry logs show them arriving shortly afterward.
  6. 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)

Lingua principale
TypeScript
Stelle
213k
Fork
28.4k
Merge medio
8h 15m
PR unite (30g)
330

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di anomalyco/opencode

Tutte le issue di anomalyco/opencode

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.