Skip to content

bug: Approving a plan no longer starts implementation on Claude Code >=2.1.199 #234

Description

@blimmer

What happened?

On Claude Code 2.1.199 and later, clicking Approve Plan in the PlanBridge browser UI no longer hands control back to the agent. The review round-trips correctly — the browser window shows the approval confirmation and closes — but the Claude Code terminal session stays blocked on its native plan-approval prompt ("Claude has written up a plan and is ready to execute. Would you like to proceed?") and implementation never starts until the user manually answers that prompt in the terminal.

The cause is an upstream Claude Code regression, filed as anthropics/claude-code#74256: as of v2.1.199, Claude Code runs the PermissionRequest hook for ExitPlanMode and reads its response, but discards the allow decision and shows its own approval prompt anyway. The changes-requested path is unaffected — deny decisions with feedback still round-trip correctly, so the annotate → refine loop keeps working. Only the approve handoff is broken.

contextbridge version

0.9.2-alpha.1 (also reproduces on the released 0.9.2 plugin)

Operating system

macOS

Steps to reproduce

  1. Install the planbridge plugin in Claude Code 2.1.199 or later (verified on 2.1.199 and 2.1.201)
  2. Start claude in plan mode and ask for any plan
  3. When Claude calls ExitPlanMode, the PlanBridge review UI opens in the browser
  4. Click Approve Plan without adding comments

What did you expect to happen?

The behavior on Claude Code <= 2.1.198: the hook's allow decision dismisses Claude Code's plan-approval prompt, the session switches to accept-edits mode, and implementation starts immediately.

What actually happened?

The terminal stays blocked on Claude Code's own plan-approval chooser. Implementation only starts after the user additionally selects "Yes" in the terminal, which reads as PlanBridge hanging after approval.

Relevant logs or stack trace

# contextbridge emits the documented allow envelope on stdout; Claude Code >=2.1.199 reads and discards it:
{"hookSpecificOutput":{"hookEventName":"PermissionRequest","decision":{"behavior":"allow","updatedPermissions":[{"type":"setMode","mode":"acceptEdits","destination":"session"}]}}}

Anything else

Version bracketing (same plugin build, driven against each Claude Code TUI):

Claude Code Approve behavior
2.1.198 works — implementation starts immediately
2.1.199 broken — terminal blocks on native prompt
2.1.201 broken — terminal blocks on native prompt

The regression reproduces with a minimal one-line auto-approve hook and no PlanBridge involvement, so it is not caused by anything in this codebase — full standalone reproduction, variant testing (bare allow, allow + setMode, PreToolUse allow), and the working-deny-path evidence are documented in anthropics/claude-code#74256. Nothing in the Claude Code 2.1.199–2.1.201 changelog announces a behavior change for hook-approved plan exits, and the current hooks documentation and @anthropic-ai/claude-agent-sdk 0.3.201 still describe the envelope above as the supported auto-approval mechanism.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions