Skip to content

Claude Code (Team/Enterprise): built-in guard cc-plugin-sec-default skips the mod's classic.PermissionRequest hook → plan approval asked twice and a second review server is left running #2007

Closed

Description

@ericknyoto

Environment

  • Plannotator 0.28.23 (marketplace commit 51d78eb), installed from the GitHub marketplace (user tier)
  • Claude Code 2.1.304, interactive CLI, Linux
  • Signed in with /login on a Team/Enterprise organization, so Claude Code seats its built-in guard cc-plugin-sec-default@builtin outermost. There is no managed-settings file on the machine, and server-managed settings are empty.

What happens

Since 2.1.304, every session shows these transcript lines:

plannotator: its prompt.context hook was skipped. "cc-plugin-sec-default" runs first and sent the event on past it.
plannotator: its classic.PermissionRequest hook was skipped. "cc-plugin-sec-default" runs first and sent the event on past it.

The 2.1.304 changelog added this line ("Added a transcript line when a plugin that runs first skips one of your mod's hooks"). The guard is documented to keep user-installed mods away from prompt content and permission decisions on org accounts (https://code.claude.com/docs/en/plugins/mods/admin), so the skipping itself looks intended. Its effect on Plannotator's plan flow is the problem:

  1. The first ExitPlanMode works: the mod's tool.call hook denies with "waiting for review" and opens the review. Approving it sends the "Approved" plugin turn as expected.
  2. The second ExitPlanMode reaches classic.PermissionRequest, but the guard skips the mod's hook (hooks/mod/register.ts, the on('classic.PermissionRequest', …) handler). The mod never gets to answer with the approved decision, so the event falls through to:
    • the plugin's own classic PermissionRequest command hook (hooks/hooks.json, matcher ExitPlanMode, plannotator), which starts a second Plannotator review server, and
    • Claude Code's normal plan-approval dialog in the terminal.
  3. The user approves in the terminal dialog. The second review server keeps running in the background and waits until it is killed manually.

As a result, each plan is approved twice and leaves an orphan plannotator process behind.

Evidence (one test session, UTC)

The prompt.context skip only drops the Inbox reminder line. The Inbox tool still registers and works.

Repro

  1. Use a Claude Code session that loads cc-plugin-sec-default: Team/Enterprise /login, or any machine with managed settings.
  2. Enter plan mode, call ExitPlanMode, and approve in Plannotator.
  3. When Claude calls ExitPlanMode again, the terminal approval dialog appears and a second review server starts.

Suggestions

  • Detect that the mod's classic.PermissionRequest hook cannot run there, for example from the guard being seated or from the skip, and fall back cleanly. Either don't open the review twice (the classic command hook could recognise a plan that was already approved for this session or tool_use and allow it), or let the classic hook own the whole flow in that case.
  • Document the workaround for org admins: make Plannotator an organization mod (directory marketplace at an admin-owned path, managed enabledPlugins, and prependPlugins: ["plannotator@plannotator", "sec-default@builtin"]), or turn the mod off with "claudeCodeMod": false / PLANNOTATOR_CLAUDE_MOD=0.

Activity

  1. derangga commented on Oct 21, 2026

    @derangga

    This also happened to me, I use the same version claude code and plannotator

    Image
  2. haseeb5i commented on Oct 21, 2026

    @haseeb5i

    Same here on Claude Code 2.1.306 (Linux, interactive CLI) with Plannotator 0.28.22, signed in to a Team/Enterprise org. Every session shows:

    plannotator: its prompt.context hook was skipped. "cc-plugin-sec-default" runs first and sent the event on past it.
    

    So it is still present two Claude Code releases after 2.1.304. A fix in Plannotator itself would be much appreciated, since turning off the mod or having an org admin re-seat it are not practical options for us.

  3. added
    bug
    triage
    on Oct 21, 2026
  4. added 2 commits that reference this issue on Oct 21, 2026
  5. backnotprop commented on Oct 21, 2026

    @backnotprop
    Owner

    Fixed in #2043.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions