From 1137dba4e0d2b9837155c73cc377f53038548eb3 Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 25 Feb 2026 12:06:48 +0000 Subject: [PATCH] story-kit: create 180_bug_web_ui_permissions_handling_unreliable --- ..._web_ui_permissions_handling_unreliable.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.story_kit/work/1_upcoming/180_bug_web_ui_permissions_handling_unreliable.md b/.story_kit/work/1_upcoming/180_bug_web_ui_permissions_handling_unreliable.md index f831a27..1d72335 100644 --- a/.story_kit/work/1_upcoming/180_bug_web_ui_permissions_handling_unreliable.md +++ b/.story_kit/work/1_upcoming/180_bug_web_ui_permissions_handling_unreliable.md @@ -11,6 +11,34 @@ Permissions handling in the web UI chat has issues. This is a tracking bug to co Known issues: 1. **Batch tool calls failing**: When the agent fires many parallel Bash calls (e.g. 11 at once), the permission/hook validation system fails with cryptic errors (`invalid_union`, `Invalid input: expected "allow"`), cascading to cancel all sibling calls. Individual calls with the same commands work fine. Unclear if this is a Claude Code SDK limitation, a hook validation issue, or a web UI problem. +## How to reproduce + +Ask the agent to check git status across all worktrees. It will attempt to run 11+ parallel Bash calls like: + +``` +git -C .story_kit/worktrees/163_story_foo status --porcelain +git -C .story_kit/worktrees/165_bug_bar status --porcelain +git -C .story_kit/worktrees/166_story_baz status --porcelain +... (11 total) +``` + +Each command individually works fine and matches the `Bash(git *)` permission rule. But when all 11 are fired in a single parallel batch, they all fail with: + +```json +{ + "code": "invalid_union", + "errors": [ + [{ "code": "invalid_value", "values": ["allow"], "path": ["behavior"], "message": "Invalid input: expected \"allow\"" }], + [{ "code": "invalid_value", "values": ["deny"], "path": ["behavior"], "message": "Invalid input: expected \"deny\"" }, + { "expected": "string", "code": "invalid_type", "path": ["message"], "message": "Invalid input: expected string, received undefined" }] + ] +} +``` + +The first call gets this error, and all remaining calls fail with `"Sibling tool call errored"`. + +Running the same commands in batches of 3 works fine. + ## How to Reproduce Issue 1: Start a chat session using claude-code provider, trigger a tool call that requires permission (e.g. a Bash command not in the allow list). Observe that the permission dialog sometimes fails to appear.