feat(windows): answer Claude Code's questions from the island - #216
Open
PythonTilk wants to merge 1 commit into
Open
PythonTilk wants to merge 1 commit into
PythonTilk wants to merge 1 commit into
Conversation
AskUserQuestion arrived as a permission request and got the Deny / Allow
card, which says nothing about what is being asked and cannot answer it.
The question view now shows the question and its options as buttons. Picking
one sends the answer back to the session; several questions are stepped
through in turn, pick-several questions get toggles and a Done button, and
"Answer in terminal" hands the request back as before.
The answer travels as {"answers":{...}} on the relay connection. coucou-hook
turns it into an allow whose updatedInput is the question's own input plus
that map, and refuses anything else: no other field and no other tool's
input can be changed from the island.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
A note on overlap, which I should have put in the description: #172 does the same thing for the Tauri build (and #109 / #71 include it among other features), following #165 on the Mac. The difference here is scope. This PR is standalone on If you would rather go with #172, close this one — no hard feelings. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
When Claude Code asks a question (
AskUserQuestion), it reaches Coucou as a permission request, so the island showed the Deny / Allow card with justAskUserQuestionon it — nothing about what was being asked, and no way to answer.The question view now shows the question and its options as buttons:
A question the island cannot show in full (cut short by the relay, or without options) is left to the terminal.
Screenshot
How it works
{"answers":{"<question>":"<label>"}}on the relay connection instead of the bareallow/deny.coucou-hookturns that into the documentedPermissionRequestoutput:behavior: "allow"withupdatedInputset to the question's own input plus theanswersmap — the same shape Claude Code's permission prompt fills in.tool_inputfor this (the copy forwarded to the island is truncated), and refuses anything else: answers are only accepted when the tool isAskUserQuestion, only string values, and no other field of the input can be changed. No other tool's input can be changed from the island at all.House rules: still an explicit click for everything; nothing new on the network; the relay never blocks Claude Code (an unanswered question times out to the terminal as before).
Not restyled
The Deny / Allow card is unchanged. The existing
questionview keeps its look for notification-style questions; with options to pick from it is 40 px taller to fit two rows of buttons.Tested
cargo test -p coucou-hook— two new tests for the answer →updatedInputmapping and for what is refused.tsc --noEmit,cargo check— no new warnings.