Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

ACP: slash commands execute but never stream their output

未关闭 适合新手
#54,371 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
cli

调研方向

先阅读 packages/cli/src/acp/turn.ts,重点查看 submit 和 Fiber.join(events) 附近的命令提示路径。追踪每轮事件订阅如何释放,并将其与常规提示路径进行比较。使用 ACP 斜杠命令复现;当其输出及任何权限更新都在轮次结束前通过 session/update 发送时,即为完成。

由索引模型根据 Issue 内容生成。

描述

reproduced

Description

User-visible symptoms

Running as an ACP agent (in JetBrains Rider 2026.2): slash commands (built-in like /init or custom) execute, but their output is not visible in the chat.

Plain prompts in the same session work normally.
Another ACP agent in the same IDE does show its slash-command output, so the client's rendering path is fine.

At the protocol level

session/prompt replies end_turn immediately; no session/update follows for that turn.

Example

Rider's ACP log (llm.agent.extended.logging=true):

20:44:23,425  → session/prompt id=5  {"prompt":[{"type":"text","text":"/my-test"}]}
20:44:23,457  ← {"stopReason":"end_turn","_meta":{}}      ← 32 ms
              … no ACP traffic for 4 m 16 s …
20:48:39,687  → session/set_config_option id=6

The command did run (it produced its effect).
OpenCode's session_message table shows that the turn ran to completion after it was closed on wire:

seq 20  user       20:44:23.531  <command body>   ← AFTER end_turn
seq 21  assistant  20:44:24.281 → completed 20:44:32.895  <agent reply>
...
seq 28  idle       20:44:32.901  outcome=succeeded

my-test was advertised in available_commands_update so this is the recognized-command path (not the unknown-/ fallthrough).


OpenCode version

2.0.26


Steps to reproduce

  1. Install OpenCode as an ACP agent in Rider.
    I used a custom agent path.
    1.1. Install OpenCode independently from Rider.
    1.2. Add OpenCode as a custom agent:
  "default_mcp_settings": {},
  "agent_servers": {
    "OpenCode": {
      "command": "full/path/to/opencode.exe",
      "args": ["acp"]
    }
  }
}
  1. Run any slash command.

Operating System

Windows 10


Suspected cause

packages/cli/src/acp/turn.ts:

yield* submit(attached, prompt)
if (prompt.command) return "succeeded" as const   // ←
return yield* Fiber.join(events)

For command prompts the turn returns succeeded before Fiber.join(events), and then the release step closes the per-turn event subscription, so no session/update (and no permission.asked) can be emitted.

Possible fix

PR #49208 (open; probably needs rebase onto current v2).

主要语言
TypeScript
星标
213k
派生
28.4k
平均合并
7 小时 22 分钟
30 天内合并 PR
276

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

anomalyco/opencode 的其他 Issue

查看 anomalyco/opencode 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。