Summary
With CodeIsland's global PreToolUse hook installed, every AskUserQuestion call from Claude Code is rejected with Permission denied by hook. Every other tool in the same session passes normally, so this is not a blanket silencing — it is specific to AskUserQuestion.
No question card is usable, so the agent cannot ask the user anything for the whole session.
Environment
|
|
| CodeIsland |
1.0.33 |
| Claude Code |
2.1.261 |
| macOS |
26.6.1 (25G76), Apple Silicon |
| Hook |
~/.claude/settings.json → PreToolUse, matcher "" → ~/.codeisland/codeisland-hook.sh → execs ~/.codeisland/codeisland-bridge |
Steps to reproduce
- Install CodeIsland so the global catch-all
PreToolUse hook is present.
- In a Claude Code session, have the agent call
AskUserQuestion.
- The call returns
Permission denied by hook.
What I observed
- 6 attempts over ~40 minutes, all denied.
- Not payload-shape dependent. Denied both for a rich payload (2 questions, options carrying
preview blocks) and for a minimal one (1 question, 2 options, no previews).
- Only this tool.
Bash, Write, Edit, subagent dispatch and several MCP tools all ran normally in the same session, before and after each denial.
- Isolated to the CodeIsland hook by elimination. The project also had its own
PreToolUse hook matching AskUserQuestion, but it only ran afplay …/Pop.aiff & — verified exit code 0 with and without the &, so it cannot deny. Removing it entirely changed nothing; the denial persisted. The CodeIsland catch-all is then the only remaining hook able to return a deny decision.
What I could not reproduce from outside the app
These may help narrow it down — the deny does not appear to live in the shell layer:
- Piping a synthetic
PreToolUse payload for AskUserQuestion to ~/.codeisland/codeisland-bridge produces no output and exit 0.
- Piping the same payload to
/tmp/codeisland-<uid>.sock returns {}.
- The identical probe for
Bash also returns {} — the socket layer does not distinguish the two tools.
So the decision seems to depend on live session state that a synthetic session_id does not match, i.e. it is inside the bridge/app rather than in codeisland-hook.sh.
Expected
AskUserQuestion should be surfaced as a question card, or passed through if CodeIsland does not handle it — but not denied.
Possibly related
Note
The shell fallback path in codeisland-hook.sh (used when the bridge binary is absent) pipes the payload through nc -U, and nc writes the socket's reply to stdout — which Claude Code parses as the hook's decision. That path is not what produced this bug on my machine (the bridge binary is present, so the script execs it), but it looks like a route by which an unexpected daemon reply could become an unintended hook decision. Flagging it in case it is useful.
Summary
With CodeIsland's global
PreToolUsehook installed, everyAskUserQuestioncall from Claude Code is rejected withPermission denied by hook. Every other tool in the same session passes normally, so this is not a blanket silencing — it is specific toAskUserQuestion.No question card is usable, so the agent cannot ask the user anything for the whole session.
Environment
~/.claude/settings.json→PreToolUse, matcher""→~/.codeisland/codeisland-hook.sh→ execs~/.codeisland/codeisland-bridgeSteps to reproduce
PreToolUsehook is present.AskUserQuestion.Permission denied by hook.What I observed
previewblocks) and for a minimal one (1 question, 2 options, no previews).Bash,Write,Edit, subagent dispatch and several MCP tools all ran normally in the same session, before and after each denial.PreToolUsehook matchingAskUserQuestion, but it only ranafplay …/Pop.aiff &— verified exit code 0 with and without the&, so it cannot deny. Removing it entirely changed nothing; the denial persisted. The CodeIsland catch-all is then the only remaining hook able to return a deny decision.What I could not reproduce from outside the app
These may help narrow it down — the deny does not appear to live in the shell layer:
PreToolUsepayload forAskUserQuestionto~/.codeisland/codeisland-bridgeproduces no output and exit 0./tmp/codeisland-<uid>.sockreturns{}.Bashalso returns{}— the socket layer does not distinguish the two tools.So the decision seems to depend on live session state that a synthetic
session_iddoes not match, i.e. it is inside the bridge/app rather than incodeisland-hook.sh.Expected
AskUserQuestionshould be surfaced as a question card, or passed through if CodeIsland does not handle it — but not denied.Possibly related
AskUserQuestionselection crashes withundefined is not an object (evaluating H.map)AskUserQuestionis affected, not every tool)Note
The shell fallback path in
codeisland-hook.sh(used when the bridge binary is absent) pipes the payload throughnc -U, andncwrites the socket's reply to stdout — which Claude Code parses as the hook's decision. That path is not what produced this bug on my machine (the bridge binary is present, so the scriptexecs it), but it looks like a route by which an unexpected daemon reply could become an unintended hook decision. Flagging it in case it is useful.