Answer: Write a policy mod whose `plugin.register` hook reads the list of calls another mod makes and refuses it; the example policy mod stops any user's mod whose code calls `$.process.run` or `$.process.spawn` while letting the rest of the plugin load. Status: Confirmed Entry: tool/claude-code/admin-and-enterprise/enforce-policy-with-mod Revision: 3 Digest: sha256:32dbbbc26bbacd22 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:05:10Z Last changed: 2026-11-17T12:29:12Z (deny alternative: — → { deny: 'your reason' }) Last verified: 2026-11-20T12:23:29Z Next check: 2026-11-21T12:23:29Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of hook event | plugin.register | [1] | 2026-11-20 blocked calls | ['process.run', 'process.spawn'] | [1] | 2026-11-20 example file path | acme-guard/hooks/register.js | [1] | 2026-11-20 refusal reason text | Acme policy: mods may not call | [1] | 2026-11-20 provides.modules requirement version | v2.1.326 or later | [1] | 2026-11-20 deny alternative | { deny: 'your reason' } | [1] | 2026-11-20 Sources: [1] Anthropic. "Manage mods for your organization". https://code.claude.com/docs/en/plugins/mods/admin.md Role: primary. Accessed: 2026-11-20T12:23:29Z Quote: "Each time another mod is about to load, your mod receives the list that `claude plugin validate` prints, in an event named [`plugin.register`]" (Supports: hook event) Quote: "const BLOCKED_CALLS = ['process.run', 'process.spawn']" (Supports: blocked calls) Quote: "Save it as `acme-guard/hooks/register.js`:" (Supports: example file path) Quote: "return { refuse: 'Acme policy: mods may not call ' + blocked.join(', ') }" (Supports: refusal reason text) Quote: "Requires Claude Code v2.1.326 or later." (Supports: provides.modules requirement version) Quote: "To block a call without refusing the whole mod, return `{ deny: 'your reason' }` from a hook on that call's name" (Supports: deny alternative) Published: 2026-11-20T03:41:00Z Snapshot SHA-256: c945e5d535f83ecdff80ae17374ecd29d519e19a8be29f45f8777b67094d7b09 (captured 2026-11-20T12:23:29Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:23:29Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:23:29Z Last attempt: 2026-11-20T12:23:29Z Notes and limitations: Extracted automatically from a single official source (section "Enforce a policy with a mod of your own"). Related: https://latestn.com/tool/claude-code/admin-and-enterprise/enforce-sandbox-org-wide How do I enforce a sandbox isolation policy across an organization in Claude Code? https://latestn.com/tool/claude-code/admin-and-enterprise/foundry-rbac-permissions What Azure RBAC permissions are required to use Claude Code with Microsoft Foundry? https://latestn.com/tool/claude-code/admin-and-enterprise/gateway-availability-limitations What are the availability and limitations of the Claude apps gateway for Claude Code? https://latestn.com/tool/claude-code/admin-and-enterprise/enable-code-review How do I turn on Code Review for my Claude organization? https://latestn.com/tool/claude-code/admin-and-enterprise/enable-contribution-metrics How do I enable contribution metrics in the Claude Code analytics dashboard? https://latestn.com/tool/claude-code/admin-and-enterprise/enable-opentelemetry How do I enable OpenTelemetry telemetry in Claude Code? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T12:29:12Z | changed | deny alternative: — → { deny: 'your reason' } | [1] 2026-11-17T12:29:12Z | changed | provides.modules requirement version: — → v2.1.326 or later | [1] 2026-11-17T12:29:12Z | changed | refusal reason text: — → Acme policy: mods may not call | [1] 2026-11-17T12:29:12Z | changed | example file path: — → acme-guard/hooks/register.js | [1] 2026-11-17T12:29:12Z | changed | blocked calls: — → ['process.run', 'process.spawn'] | [1] 2026-11-17T12:29:12Z | changed | hook event: — → plugin.register | [1] 2026-11-17T12:29:12Z | changed | crash threshold: three times → — | [1] 2026-11-17T12:29:12Z | changed | version for ui.focus matcher: v2.1.323 → — | [1] 2026-11-17T12:29:12Z | changed | tier values: prepend → — | [1] 2026-11-17T12:29:12Z | changed | method name format: namespace.method → — | [1] 2026-11-17T12:29:12Z | changed | where the mod must be: prependPlugins → — | [1] 2026-11-17T12:29:12Z | changed | event name: plugin.register → — | [1] 2026-11-15T12:23:43Z | changed | crash threshold: — → three times | [1] 2026-11-15T12:23:43Z | changed | version for ui.focus matcher: — → v2.1.323 | [1] 2026-11-15T12:23:43Z | changed | tier values: — → prepend | [1] 2026-11-15T12:23:43Z | changed | method name format: — → namespace.method | [1] 2026-11-15T12:23:43Z | changed | where the mod must be: — → prependPlugins | [1] 2026-11-15T12:23:43Z | changed | event name: — → plugin.register | [1] 2026-11-15T12:23:43Z | changed | deny alternative: { deny: 'your reason' } → — | [1] 2026-11-15T12:23:43Z | changed | refusal return: { refuse: 'Acme policy: mods may not call ' + blocked.join(', ') } → — | [1] 2026-11-15T12:23:43Z | changed | example file: acme-guard/hooks/register.js → — | [1] 2026-11-15T12:23:43Z | changed | mod location: prependPlugins → — | [1] 2026-11-15T12:23:43Z | changed | hook event: plugin.register → — | [1] 2026-11-13T03:05:10Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/admin-and-enterprise/enforce-policy-with-mod/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/enforce-policy-with-mod POST: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/enforce-policy-with-mod with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/enforce-policy-with-mod?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I enforce a policy with my own mod in Claude Code? Revision 3, last verified 2026-11-20T12:23:29Z. https://latestn.com/tool/claude-code/admin-and-enterprise/enforce-policy-with-mod (accessed 2026-11-21T10:01:56Z). @misc{LatestN_tool_claude_code_admin_and_enterprise_enforce_policy_with_mod_r3, title = {How do I enforce a policy with my own mod in Claude Code?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/admin-and-enterprise/enforce-policy-with-mod}}, note = {Revision 3; digest sha256:32dbbbc26bbacd22; last verified 2026-11-20T12:23:29Z; accessed 2026-11-21T10:01:56Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/admin-and-enterprise/enforce-policy-with-mod