ACP: first prompt can miss MCP tools supplied to session/new (2.0.18 / 2.0.22)
Maintainer thường phản hồi trong vòng 1 ngày
@kitlangton đang làm issue này rồi.
Từ ngày 5/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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)
- Ngôn ngữ chính
- TypeScript
- Star
- 212k
- Fork
- 28.1k
- Merge trung bình
- 9 giờ 58 phút
- Pull request đã merge (30 ngày)
- 373
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
Windows: global-project session path depends on server process drive, hides API-created sessions from desktop pickerCó thể đã có người làm @1624318455 đã nhận 11 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[FEATURE]: Test that PermissionV2 declines pending requests when its scope closesCó thể đã có người làm @saeedahmed96 đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
EffectFlock heartbeat never refreshes, so locks held over 60 s can be brokenCó thể đã có người làm @iceteaSA đã nhận 12 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
anomalyco/opencode#51159 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Comfy-Org/ComfyUI_frontend#20346 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
decentralized-identity/didwebvh-ts#203 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
lingdojo/kana-dojo#31791 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Telegram webhook: line breaks lost since switch to rich messagesCó thể đã có người làm @Kshot3000 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
github_actions security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày