-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Description
We’ve gotten at least one report so far of Zed breaking for a user if they asked a question which prompted the LLM to use the AskUserQuestion tool. As mentioned in my comment on that issue:
However, Zed doesn’t really support interactive inputs (needed for asking questions) as of now, so we effectively do not support that tool. OpenCode -- if they are open to it -- should disable that tool if they detect the request is coming from Zed.
I quickly asked Opus 4.5 to go through both our codebases and it suggested 3 solutions and I only really liked one of them. So for now, here’s the suggestion I liked (because it seems the most straight-forward to me):
Zed already sends some info about itself here, maybe we can use that in initialize?
In other words, IIUC, OpenCode already receives client info from Zed with name: "zed". You’d just have to check it somehow:
// Check if running under a known ACP client that doesn’t support question tool
const disableQuestionTool = clientInfo?.name === "zed"
...(!disableQuestionTool && ["app", "cli", "desktop"].includes(Flag.OPENCODE_CLIENT) ? [QuestionTool] : []),If this sounds like an OK change, happy to send a PR. If not, do you guys have a better solution? Would really like to see OpenCode working in Zed!
Plugins
N/A
OpenCode version
1.1.42
Steps to reproduce
- Open Zed (grabbing Nightly is optimal:
curl https://zed.dev/install.sh | ZED_CHANNEL=nightly sh) - Install OpenCode from the ACP registry (open the command palette and do
zed: acp registry) - Ask the agent something that would prompt the use of the
AskUserQuestiontool - Zed will forever keep spinning (see screenshot below or in the original issue on our repo)
Screenshot and/or share link
zed-industries/zed#48038 (comment)
Operating System
macOS 15.7.3
Terminal
No response