if you’re using Claude Code’s plan mode, you’ve probably seen the “ready to code?” approval dialog. as I always approve Opus 4.6's plan, no need to do this thing manually anymore. turns out you can automate that click with a single hook once you target the right event.
this also highlights a tiny docs gap tracked in anthropic’s repo: issue #11891 (“[DOCS] Missing PermissionRequest hook details in Hooks Guide and Input Reference schema”). + not well-documented and we need to do better job on documenting JSON payload details as Claude Code is not open-source, we had to do basic reverse engineering (not cool as its name, basically, just add event listener that save JSONs into a folder, and read from there, not assembly patched xD)
the key detail: it’s PermissionRequest (not Stop)
the approval dialog is a PermissionRequest for the tool ExitPlanMode.
Stop fires after a run is done. plan approval happens while Claude is waiting for user input, so Stop is the wrong place to intercept it.
what PermissionRequest sends (stdin)
here’s the (currently under-documented) shape you get on stdin when the dialog pops:
two useful bits:
tool_nametells you what is asking (here:ExitPlanMode)tool_input.plancontains the full plan markdown (which you can archive elsewhere)
minimal auto-approve hook (copy/paste)
script: ~/.claude/hooks/auto-approve-plan.sh
config (only match ExitPlanMode, not everything):
notes that save time:
- your hook should read stdin (otherwise you can hang)
- your output must be wrapped under
hookSpecificOutputwithhookEventName: "PermissionRequest"
optional: archive each plan to Craft.do
because the plan markdown is already in tool_input.plan, you can ship it to Craft.do in the background and still return the approval immediately.
the only “gotcha”: don’t pull the markdown into a shell variable and then re-embed it into JSON (multiline content will bite you). build the Craft.do payload in a single jq pass instead.
fire-and-forget archive (don’t block the approval response)
approve the dialog
if you want this packaged: yigitkonur/hooks-claude-approve
i bundled the “auto-approve + (optional) Craft.do archive” flow into yigitkonur/hooks-claude-approve.
modes:
| mode | auto-approve | Craft.do archive | use case |
|---|---|---|---|
| 1 | yes | no | skip the approval dialog |
| 2 | yes | yes | skip approval and archive every plan |
| 3 | no | yes | archive plans but still click approve manually |
install:
links
- hooks tool: https://github.com/yigitkonur/hooks-claude-approve
- docs gap tracker: https://github.com/anthropics/claude-code/issues/11891
- official hooks guide: https://docs.anthropic.com/en/docs/claude-code/hooks