story-kit: create 180_bug_web_ui_permissions_handling_unreliable
This commit is contained in:
@@ -11,6 +11,34 @@ Permissions handling in the web UI chat has issues. This is a tracking bug to co
|
|||||||
Known issues:
|
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.
|
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
|
## 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.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user