返回 CodeWhale
before_deny_exit2.case.json
根目录 / crates / tui / tests / fixtures / conformance / hooks / before_deny_exit2.case.json
1 {
2 "description": "tool_call_before: the legacy hard deny — exit code 2 with no JSON — refuses with the generic reason.",
3 "event": "tool_call_before",
4 "model": "deepseek-v4-pro",
5 "tool": {
6 "name": "Bash",
7 "call_id": "call_hook_bash",
8 "input": {
9 "command": "rm -rf build"
10 }
11 },
12 "hooks": [
13 {
14 "event": "tool_call_before",
15 "name": "legacy",
16 "command": "{{capture}} legacy; echo 'blocked by a legacy hook' >&2; exit 2"
17 }
18 ]
19 }
20
20 lines JSON