ACP: first prompt can miss MCP tools supplied to session/new (2.0.18 / 2.0.22)
メンテナーはふだん 1 日以内に返信
@kitlangton がすでに取り組んでいます。
2026年10月5日 から。
評価
この issue はまだ評価されていません。
説明
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)
- 主要言語
- TypeScript
- スター
- 212k
- フォーク
- 28.1k
- 平均マージ
- 8時間 49分
- マージ済み PR(30日)
- 348
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode のほかの issue
-
Windows: global-project session path depends on server process drive, hides API-created sessions from desktop picker対応中かも @1624318455 が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[FEATURE]: Test that PermissionV2 declines pending requests when its scope closes対応中かも @saeedahmed96 が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
EffectFlock heartbeat never refreshes, so locks held over 60 s can be broken対応中かも @iceteaSA が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
anomalyco/opencode#51159 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
anomalyco/opencode の issue をすべて見る
似ている issue
-
enhancement good first issue priority: low size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
streamplace/streamplace#1351 ·
メンテナーはふだん 2 日以内に返信
-
Link Checker Reportオープンautomated issue report
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
databendlabs/databend-docs#3511 ·
-
automated issue report
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100