Skip to content

fix(hook): forward approve feedback to Claude Code agent via systemMessage - #1440

Open
mangxy wants to merge 1 commit into
backnotprop:mainfrom
mangxy:fix/cc-approve-feedback
Open

fix(hook): forward approve feedback to Claude Code agent via systemMessage#1440
mangxy wants to merge 1 commit into
backnotprop:mainfrom
mangxy:fix/cc-approve-feedback

Conversation

@mangxy

@mangxy mangxy commented Sep 1, 2026

Copy link
Copy Markdown

Summary

Fixes #1359

On the Claude Code approve path, annotations collected in the review UI are silently dropped — only the allow decision (with updatedInput / updatedPermissions) reaches the agent. The Gemini CLI approve path already forwards feedback via systemMessage; the Claude Code path does not, so "annotate + approve" is indistinguishable from a plain approve.

Change

One line in apps/hook/server/index.ts: attach the collected feedback as hookSpecificOutput.systemMessage on the approve branch, mirroring the Gemini CLI path (line 2308).

hookSpecificOutput: {
  hookEventName: "PermissionRequest",
  systemMessage: result.feedback || undefined,
  decision: {
    behavior: "allow",
    // ... existing updatedInput / updatedPermissions untouched
  },
},

JSON.stringify drops the field entirely when there is no feedback, so plain approves produce byte-identical output to before.

Verification

  • Verified the bug is still present on current main (9f9ee27) before patching.
  • Approve with annotations: feedback now delivered to the agent.
  • Approve without annotations: output identical to pre-patch (field omitted).
  • Deny path unchanged (already delivers feedback via decision.message).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Code: plan annotations are silently dropped when the plan is approved (approve path never sends feedback to the agent)

1 participant