happy icon indicating copy to clipboard operation
happy copied to clipboard

Support AskUserQuestion tool with multiple-choice options on mobile

Open nikhilsitaram opened this issue 9 months ago • 12 comments

Feature Request

When Claude Code calls the AskUserQuestion tool, the mobile interface shows raw JSON and only yes/no buttons. The actual question text and multiple-choice options aren't rendered, and there's no way to select a specific option.

Current Behavior

  1. Claude calls AskUserQuestion with structured input:
    {
      "questions": [{
        "question": "Which approach should we use?",
        "options": [
          { "label": "Option A", "description": "..." },
          { "label": "Option B", "description": "..." }
        ]
      }]
    }
    
  2. Happy routes it through the generic permission system (--permission-prompt-tool stdio)
  3. Mobile shows "Claude wants to Ask User Question" with raw JSON arguments
  4. User can only tap Approve/Deny
  5. On approve, handlePermissionResponse returns the original input unchanged — no selection is captured

Expected Behavior

  • Mobile UI detects AskUserQuestion tool calls and renders the question text and option buttons
  • User taps an option (or types a custom response)
  • The selection is sent back and injected into the response to Claude

Technical Context

The limitation is in the permission response format — it only carries approved, reason, mode, and allowTools. There's no field to carry the user's selection back. The handlePermissionResponse method resolves with { behavior: "allow", updatedInput: pending.input } (original input, unchanged).

This would require changes in:

  1. Mobile app: Detect AskUserQuestion in agent state requests, render question/options UI
  2. Permission response schema: Add a field for user selection (e.g. answer or selectedOptions)
  3. CLI handler: handlePermissionResponse to construct a proper response for Claude with the user's answers

Workaround

For now, Claude can use the <options> XML block in its text output (which Happy already renders as tappable buttons) instead of the AskUserQuestion tool when running through Happy.

nikhilsitaram avatar Feb 16 '26 05:02 nikhilsitaram

Current behavior of it auto answering questions is making the tool unusable for my workflows. Planning mode is so useful in regular claude but unusable here.

variablefate avatar Feb 23 '26 21:02 variablefate

What's the status on this?

I see that @bbaldino has implemented it. Will you make a pull request?

Miista avatar Feb 28 '26 17:02 Miista

@balding does your implementation support multiple questions?

Miista avatar Feb 28 '26 18:02 Miista

Yeah. I had a couple other tweaks I did after that initial commit though. Also added the "Chat about this" option at the bottom.

Image

bbaldino avatar Feb 28 '26 21:02 bbaldino

@bbaldino

  1. How did you get it working on the phone? Release via App Store?
  2. Do you know if your changes have been merged here?

Miista avatar Mar 01 '26 06:03 Miista

@bbaldino

  1. How did you get it working on the phone? Release via App Store?
  2. Do you know if your changes have been merged here?

I use android and did a preview build for myself. This meant hosting the relay server too

No they're not merged here

bbaldino avatar Mar 01 '26 06:03 bbaldino

@bbaldino shouldn't we get them merged here? :)

Miista avatar Mar 01 '26 18:03 Miista

Pretty sure happy devs gave up on this project. There was another called Happier that is being worked on. But now that Anthropic is getting better mobile support I'm sure these tools will be obsolete soon.

nikhilsitaram avatar Mar 02 '26 05:03 nikhilsitaram

@nikhilsitaram we'll see. I actually came here because I found Anthropic's implementation lacking. That could change, though.

Miista avatar Mar 02 '26 06:03 Miista

Didn't know about happier, that's promising. But yeah I didn't find anthropic's built-in version to be very good either, so I started patching what I was running into here.

bbaldino avatar Mar 02 '26 06:03 bbaldino

I'd love to try Happier but it's not released yet. Cc: @leeroybrun

Miista avatar Mar 02 '26 07:03 Miista

@Miista @bbaldino @nikhilsitaram thank you for the interest! :) I updated the Happier readme yesterday with the instructions on how to use it. Please note that it's in alpha preview release stage, so not fully stable yet. I have a big update coming soon with a lot of new features and improvements, though.

If you want to follow more closely and get more details, feel free to join the Discord and the preview group: https://discord.gg/W6Pb8KuHfg

Would love to hear your thoughts and feedback!

leeroybrun avatar Mar 03 '26 06:03 leeroybrun