Commit 36e7371
committed
fix(claude-cli): return updatedInput in can_use_tool allow response
Claude Code >= 2.1.156 tightened its PermissionResult schema so an
approved can_use_tool control_response allow branch must carry an
updatedInput record. The Claude live-session bridge answered with the
deprecated { behavior: "allow" } shape and no updatedInput, so the CLI
rejected every approval-gated native tool call (Bash, WebFetch, and
AskUserQuestion among them) with a ZodError before the tool ran.
Echo the tool input back unchanged as updatedInput on the allow branch,
matching the shape the Claude Code 2.1 binary expects. The deny branch
and all other behavior are unchanged.
Fixes #95171.1 parent ce4a259 commit 36e7371
2 files changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1960 | 1960 | | |
1961 | 1961 | | |
1962 | 1962 | | |
1963 | | - | |
| 1963 | + | |
1964 | 1964 | | |
1965 | 1965 | | |
1966 | 1966 | | |
1967 | 1967 | | |
1968 | 1968 | | |
1969 | 1969 | | |
1970 | 1970 | | |
| 1971 | + | |
1971 | 1972 | | |
1972 | 1973 | | |
1973 | 1974 | | |
| |||
2329 | 2330 | | |
2330 | 2331 | | |
2331 | 2332 | | |
2332 | | - | |
| 2333 | + | |
2333 | 2334 | | |
2334 | 2335 | | |
2335 | 2336 | | |
2336 | 2337 | | |
| 2338 | + | |
2337 | 2339 | | |
2338 | 2340 | | |
2339 | 2341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
866 | 866 | | |
867 | 867 | | |
868 | 868 | | |
| 869 | + | |
869 | 870 | | |
870 | 871 | | |
871 | 872 | | |
| |||
875 | 876 | | |
876 | 877 | | |
877 | 878 | | |
| 879 | + | |
878 | 880 | | |
879 | 881 | | |
880 | 882 | | |
| |||
0 commit comments