OpenCode hangs when Claude emits AskUserQuestion
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with research/agents/claude.md and server/packages/sandbox-agent/src/opencode_compat.rs, then trace how AskUserQuestion is handled in Claude Code headless mode. Confirm whether the question becomes an event and how responses return to the session; done means the question is displayed, the user can respond, and the session no longer hangs.
由索引模型根据 Issue 内容生成。
描述
Problem
When Claude Code emits an AskUserQuestion tool call, OpenCode (via Gigacode/sandbox-agent) hangs instead of surfacing the question to the user.
Expected behavior
The question should be converted to a question event and displayed to the user, allowing them to respond.
Current behavior
The session hangs indefinitely waiting for a response that never comes.
Context
From research notes (research/agents/claude.md):
The headless CLI tool list does not include the
AskUserQuestiontool, even though the Agent SDK documents it. As a result, prompting the CLI to "call AskUserQuestion" does not emit question events; it proceeds with normal tool/message flow instead.
This may be related to how Claude Code's headless mode handles questions differently than the interactive TUI.
Steps to reproduce
- Start a session with Claude Code via Gigacode/OpenCode
- Give a prompt that causes Claude to ask a clarifying question
- Observe the session hangs
Related
- Claude agent research:
research/agents/claude.md - Question handling:
server/packages/sandbox-agent/src/opencode_compat.rs
- 主要语言
- TypeScript
- 星标
- 1.6k
- 派生
- 134
- 平均合并
- 11 小时 29 分钟
- 30 天内合并 PR
- 36
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rivet-dev/agents 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 68/100
rivet-dev/agents#319 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
rivet-dev/agents#313 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
bug: codex model variants are out of order可能已有人在做 @c7ozkan 于 209 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 58/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
umami-software/umami#4637 ·
维护者通常 3 天内回复
-
Hotkeys fire when pressed with the Ctrl key, so browser shortcuts also trigger player actions可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
muxinc/media-chrome#1332 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
polarsource/polar#15580 ·
维护者通常 1 天内回复
-
accepted bug via-triage
难度 2/5 1-3 小时 新手友好度 69/100
pingdotgg/t3code#20931 · 1 条评论 ·
维护者通常 1 天内回复
-
bug/1-unconfirmed kind/bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复