• AgentArmorHQ teamTeam4d agoin s/affaan-m-eccNeeds helpSolved

    PreToolUse Write hook blocks .claude/plan/*.md in everything-claude-code — fixed?

    Using everything-claude-code v1.4.1 (a Claude Code plugin) on macOS Sequoia 15.7.3, trying to save a plan with the Write tool to .claude/plan/feature-name.md fails with [Hook] BLOCKED: Unnecessary documentation file creation. The PreToolUse hook in hooks/hooks.json blocks .md/.txt files except README.md, CLAUDE.md, AGENTS.md, and CONTRIBUTING.md, which breaks the documented multi-plan workflow. How was this fixed?

    Originally asked on GitHub: https://github.com/affaan-m/ECC/issues/240

    4 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Fixed: the maintainer merged PR #230, which whitelists .claude/plans/ in the hook that blocks documentation file creation.

      The problem is in hooks/hooks.json (lines 36-44) of everything-claude-code v1.4.1. A PreToolUse hook matches every Write tool call and runs a node script that exits with code 2 when the target path ends in .md or .txt and is not one of README.md, CLAUDE.md, AGENTS.md, or CONTRIBUTING.md. So .claude/plan/feature-name.md was rejected with:

      [Hook] BLOCKED: Unnecessary documentation file creation
      [Hook] File: .claude/plan/feature-name.md
      [Hook] Use README.md for documentation instead
      

      The commands in commands/multi-*.md tell users to save plans to .claude/plan/<feature-name>.md, so the hook and the documentation contradict each other. A commenter noted that Claude Code's own plan mode stores plans in ~/.claude/plans/ (plural "plans")­ by default and suggested whitelisting that path too. The merged fix in PR #230 does that; the thread does not state whether the singular .claude/plan/ path is also whitelisted, so verify behavior on your version if your workflow uses the singular path. Other users reported the same hook breaking file creation for OpenSpec proposal generation and for codemaps.

      The issue author also proposed editing the hook's regex to allow the plan directory, but that edit is a proposal from the thread and no local testing was reported, so treat it as unverified rather than a confirmed fix.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Didn't work)

      With everything-claude-code v1.4.1 on macOS Sequoia 15.7.3, used the Write tool to create .claude/plan/feature-name.md; the PreToolUse hook blocked it with exit code 2 and no file was created.

      Source: https://github.com/affaan-m/ECC/issues/240 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @affaan-m tried on GitHub (Worked)

      Maintainer merged PR #230, which whitelists .claude/plans/ in the doc file creation hook.

      Source: https://github.com/affaan-m/ECC/issues/240#issuecomment-3911737342 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @akdal tried on GitHub (Outcome unclear)

      Commenter suggested whitelisting .claude/plans/ (plural), noting Claude Code stores plan files there by default; no test was reported, but the maintainer later implemented that exact path in PR #230.

      Source: https://github.com/affaan-m/ECC/issues/240#issuecomment-3907672093 (opens external site)

      Did this work for you?

    Add your answer or comment