claude-code-webui icon indicating copy to clipboard operation
claude-code-webui copied to clipboard

[Bug]: web UI does not support AskUserQuestion interaction

Open bbugh opened this issue 11 months ago • 1 comments

Issue Type

  • [ ] 🐛 bug - Bug fix (non-breaking change which fixes an issue)
  • [ ] 🖥️ backend - Backend-related issue
  • [ ] 🎨 frontend - Frontend-related issue

Component

Not sure

Bug Description

When Claude does an AskUserQuestion interaction, there will be a prompt to confirm permission for it, but then the question will not appear in the webui. The prompt will basically get stuck in a loop, where it will keep asking the question but not getting a response.

I had to claude --continue in the terminal and say "ask the question again, I was in webui which doesn't support it" to make progress.

Steps to Reproduce

  1. make a plan that causes Claude to trigger an AskUserQuestion event
  2. give permission
  3. observe that it does not show the prompt, nor can it continue past this

Expected Behavior

The webui should show the prompt options and allow the user to choose them or respond in a different way.

Actual Behavior

Described above

Operating System

macOS (Apple Silicon)

Installation Method

npm install -g @anthropic-ai/claude-code-webui

Node.js Version

v20.6.1

Deno Version (if applicable)

deno 1.45.2

Claude CLI Version

2.0.74 (Claude Code)

Claude CLI Installation Path

/Users/username/.asdf/shims/claude

Browser (for frontend issues)

Firefox 146.0

Console Logs/Error Messages


Configuration


Additional Context

No response

Checklist

  • [x] I have searched existing issues to make sure this is not a duplicate
  • [x] I have provided all the required information above
  • [x] I have removed any sensitive information from logs and configuration

bbugh avatar Dec 20 '25 16:12 bbugh

This is a real gap and the symptom is exactly right — AskUserQuestion is a built-in tool the CLI invokes synchronously expecting a structured selection payload back, and the webui currently has no UI affordance to accept it.

The reason it loops: Claude's AskUserQuestion waits for a tool_result whose content has the schema {"selection": <answer>}. Granting the permission is separate from answering — granting only allows the tool to run; the tool then immediately blocks waiting for the selection that the webui never collects. The CLI works because it has the interactive picker; the webui doesn't yet.

A minimal fix path:

  1. Detect AskUserQuestion in the tool-use stream (matches name AskUserQuestion).
  2. Render the questions[] from tool_input as a form (each question has header, options[], multiSelect, optional per-option preview).
  3. On submit, post a tool_result for that tool_use_id with content {"answers": {"<question text>": "<chosen label>"}} (and annotations for previews if used).
  4. Keep the existing "Other → free text" fallback the CLI provides.

The schema is documented in the AskUserQuestion tool definition the CLI ships with — happy to draft the React component if useful, it's mostly a switch on multiSelect + radio/checkbox group.

Sidenote: Claude CLI 2.0.74 is several point releases behind the current 2.1.x. The AskUserQuestion tool shape has stayed compatible across them, but worth bumping to confirm the bug isn't something else stacked on top.

daveCode-dot avatar May 14 '26 02:05 daveCode-dot