# allowManagedHooksOnly

> The key that lets only the company's hooks run.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** allowManagedHooksOnly setting

## Think of it like

It is like a school where only the teacher's alarms may ring. Alarms kids bring stay quiet.

## Definition

allowManagedHooksOnly is a key for managed settings. It lets only IT's hooks run. Set to true, it skips hooks in user, project and local files. Hooks still run if they come from IT, from the Agent SDK, or from a plugin IT turns on. It is read from managed settings only.

## Example

Emma's company found a hook in a repo that sent code to an outside server. IT turns this key on, and only its own hooks run.

## Example code

```json
{
  "allowManagedHooksOnly": true
}
```

Run only the hooks IT sends out.

## Why it matters

A hook runs a command on your machine, so a hook from a cloned repo is a real risk.

## Common mistake

Putting it in a user or project file. It only works from managed settings.

## Three principles

- **Company hooks only.** Others skipped.
- **SDK hooks still run.** And forced plugins.
- **Managed only.** Nowhere else.

## Related terms

- [Claude Code Hook](https://learn.benibix.com/term/ai/claude-code-hook)
- [Managed Settings File](https://learn.benibix.com/term/ai/managed-settings-file)
- [allowManagedPermissionRulesOnly](https://learn.benibix.com/term/ai/allow-managed-permission-rules-only-setting)

![What each lockdown key takes away from people's own files: hooks, permission rules, their own skills, agents, hooks and MCP servers, or marketplaces.](https://learn.benibix.com/diagrams/managed-lockdown-keys.svg)

---

Source: https://learn.benibix.com/term/ai/allow-managed-hooks-only-setting
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
