From 32a9ef779a364de37e8179ef15a80304b704a784 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 26 Feb 2026 15:31:50 +0000 Subject: [PATCH] story-kit: create 212_bug_permission_hook_returns_invalid_response_blocking_edit_and_write_tools --- ..._response_blocking_edit_and_write_tools.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .story_kit/work/1_upcoming/212_bug_permission_hook_returns_invalid_response_blocking_edit_and_write_tools.md diff --git a/.story_kit/work/1_upcoming/212_bug_permission_hook_returns_invalid_response_blocking_edit_and_write_tools.md b/.story_kit/work/1_upcoming/212_bug_permission_hook_returns_invalid_response_blocking_edit_and_write_tools.md new file mode 100644 index 0000000..c1529e0 --- /dev/null +++ b/.story_kit/work/1_upcoming/212_bug_permission_hook_returns_invalid_response_blocking_edit_and_write_tools.md @@ -0,0 +1,28 @@ +--- +name: "Permission hook returns invalid response blocking Edit and Write tools" +--- + +# Bug 212: Permission hook returns invalid response blocking Edit and Write tools + +## Description + +When Claude Code attempts to use the Edit or Write tools on files in the project root (e.g. README.md), the permission hook returns an invalid response that causes the tool call to fail. The error indicates the hook response is missing a required `message` field when the `behavior` is not "allow". + +## How to Reproduce + +1. Ask Claude Code to edit README.md using the Edit or Write tool +2. The permission hook fires and returns an invalid response +3. The tool call fails with a schema validation error about `behavior` and missing `message` field + +## Actual Result + +Edit and Write tools fail with error: `Invalid input: expected "allow"` / `expected string, received undefined` for `message` field. The hook response doesn't conform to the expected schema. + +## Expected Result + +The permission hook should return a valid response — either `{ behavior: "allow" }` or `{ behavior: "deny", message: "reason" }` — so that Edit and Write tools work normally. + +## Acceptance Criteria + +- [ ] Permission hook returns valid responses for Edit and Write tool calls +- [ ] Editing files in the project root (e.g. README.md) works without hook errors