Commit 63f7d09
committed
feat(ai-chat): surface queued user clarifications via PostToolUse
With PreToolUse hooks now returning {} (allow), the old practice of
appending CLARIFICATION_HINT to permissionDecisionReason no longer
reaches Claude when a user types a follow-up mid-stream — Edit,
Write, and Read all fall straight through to native execution.
Add a catch-all PostToolUse hook (no matcher) that returns the hint
as additionalContext whenever _queuedClarification is set. Fires
after every tool — Bash, Grep, Glob, WebFetch, Task, the Phoenix MCP
tools, etc. — so any in-flight checkpoint prompts Claude to call
getUserClarification before continuing. Becomes a no-op once the
queue is drained.
Edit/Write specific PostToolUse hooks now return {} for all paths;
clarification is centralised in the catch-all so we can't double-fire.1 parent 4562292 commit 63f7d09
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
| 867 | + | |
867 | 868 | | |
868 | 869 | | |
869 | 870 | | |
| |||
900 | 901 | | |
901 | 902 | | |
902 | 903 | | |
| 904 | + | |
903 | 905 | | |
904 | 906 | | |
905 | 907 | | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
906 | 923 | | |
907 | 924 | | |
908 | 925 | | |
909 | 926 | | |
910 | 927 | | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
911 | 943 | | |
912 | 944 | | |
913 | 945 | | |
| |||
0 commit comments