Description
Summary
With a Claude Code PermissionRequest hook that allows a tool, the tool runs at once, but bb's approval card for that call stays pending. The turn finishes normally, then the thread's next message is queued until someone resolves a card for a call that has already finished. I expected the card to close when Claude cancels the permission request.
Versions and environment
- bb 0.46.1 (desktop app), macOS 27.0.1
- claude-code, claude 2.1.316
- Worktree environment, bb Connect in use
Not reproduced on the latest release. 0.48.1 is out, but the in-app update here failed with "Download failed. Update again to retry." The code path below is unchanged on main at d083003e469db9fa4b85d6abe56519e0e034b25f, by reading only.
Steps to reproduce
-
Add a hook script and make it executable:
#!/bin/sh cat >/dev/null printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PermissionRequest","decision":{"behavior":"allow"}}}'
-
Register it in
~/.claude/settings.json:{"hooks":{"PermissionRequest":[{"matcher":"mcp__.*","hooks":[{"type":"command","command":"/path/to/hook.sh"}]}]}} -
Have any MCP server connected with a tool that is not annotated read-only. I used Linear's
whoami. -
Start a thread in plan mode, where such calls prompt even with
--permission-mode full:bb thread spawn --project <project> --provider claude-code --permission-mode full --plan \ --prompt "Call mcp__linear__whoami once and reply in one line. No plan, no questions, no ExitPlanMode."
-
When the thread goes idle, run
bb thread interactions list <thread>. -
Run
bb thread tell <thread> 'Reply OK.'
Did not reproduce with: MCP tools annotated read-only, such as Linear's list_teams. They raise no prompt in plan mode, so no card appears.
Expected vs actual
Expected: the card closes when Claude cancels the request, and the next message dispatches.
Actual: the call completes, the thread is idle, and the card is still pending:
bb thread list --json -> {"status":"idle","hasPendingInteraction":true}
bb thread tell -> Thread thr_8jajf3wgfc message queued (waiting for a pending interaction); it dispatches when that clears
Granting the stale card with `bb thread interactions grant <id> <thread> --scope turn` dispatches the queued message.
Evidence
Timing from driving claude directly over stream-json with the same flags bb uses, and delaying the answer to the permission request by 8 seconds:
5.1 PROMPT mcp__linear__whoami (can_use_tool control_request)
5.1 HOOK hook_started
5.3 HOOK hook_response {"hookSpecificOutput":{"hookEventName":"PermissionRequest","decision":{"behavior":"allow"}}}
5.3 PROMPT CANCELLED (control_cancel_request)
5.6 OK tool result returned
So Claude raises the prompt and starts the hook together, then cancels the prompt when the hook answers.
In one bb test thread, five sequential MCP calls, none annotated read-only, left five pending cards while every call completed.
Observed thread ids (archived, on my machine): thr_8jajf3wgfc, thr_h8auv2fhkr.
Likely cause (from reading the code, not confirmed by a fix): the bridge's abort handler removes its local waiter and resolves the request, but sends nothing to bb, so the interaction row stays pending:
bb/plugins/provider-claude-code/src/bridge/bridge.ts
Lines 1995 to 2004 in d083003
| const onAbort = (): void => { | |
| if (!threadSession.pendingInteractiveRequests.delete(requestId)) { | |
| return; | |
| } | |
| finish({ | |
| behavior: "deny", | |
| message: "Interactive request cancelled", | |
| toolUseID: args.toolUseId, | |
| }); | |
| }; |
#4697 described this same gap for native question and permission requests and was closed unmerged on 2026-10-02, with no reason on the PR.
What you ruled out
- Not an existing issue: searched open and closed issues for the hook, stale interactions,
control_cancel_requestandnotifications/cancelled. Close cancelled Claude question forms #4697 is the only match, and it is a PR. - Not a failed tool call: the calls completed and their results reached the agent.
- Not cleared by time or by sending a message: the card stayed pending and the message stayed queued until it was granted.
Suggested priority and effort
Medium. It affects anyone using a PermissionRequest hook with the Claude provider, and blocks the thread's next message until the card is cleared. Workaround: have the hook also grant pending MCP cards through bb thread interactions grant. No data loss. #4697 may be a useful starting point.
Checks
- I reproduced this on the latest release or on
main, or I say above that I could not. - I searched open and closed issues for the same problem.
- If an agent wrote this, the body ends with
> AGENT GENERATEDand links the thread or report.
Produced in bb thread thr_n4c3efsc2w (local to my machine, so not linkable).
AGENT GENERATED
Activity
bb-slop-cop commentedon Nov 3, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotprovidersandprovider-claude-code; preserved existing values.partial-repro.Close approval cards the agent withdraws
Close approval cards the agent withdraws
Close approval cards the agent withdraws