Amp — Hooks
- File format
- JSON
- Discovery path
-
.amp/settings.json - Syllago install method
- JSON merge
- Symlink support
- No
- Config file
-
.amp/settings.json - Handler types
-
command
Hook events
Amp supports hooks, but syllago does not yet map its hook event names. Hook conversion to and from Amp is best-effort.
Features
How each feature converts to syllago's canonical format. See format conversion for what these statuses mean.
Fields
Native frontmatter or config fields this provider exposes. The first column is the provider's own field name; the canonical key column links to syllago's cross-provider equivalent.
| Provider field | Conversion | Canonical key | Summary |
|---|---|---|---|
action | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | handler_types | command-only: hook 'action' field runs a shell command; no HTTP, LLM, or agent handler types documented |
action | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | — | The hook 'action' field invokes a shell command (declarative pre-execute 'send-user-message' and post-execute 'redact-tool-input' actions); no HTTP, LLM, or agent handler types are documented. |
event | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | — | Two events: 'tool:pre-execute' (before tool runs) and 'tool:post-execute' (after); each event accepts only specific actions. Canonical mapping: before_tool_execute → tool:pre-execute, after_tool_execute → tool:post-execute. |
input.contains | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | matcher_patterns | Amp hooks filter firing via 'input.contains' — exact literal substring match against tool input |
input.contains | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | — | Filter hook firing by exact literal substring match in tool input — no regex or glob support. |
action | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | — | Delegate decisions to an external program (JSON via stdin, exit code = decision); plugin API is the recommended successor. |
action.type | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | — | Pre-execute action that injects a user message and cancels the pending tool call to enforce behavioral constraints. |
action.type | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | — | Post-execute action that redacts tool input fields after execution to avoid storing sensitive arguments. |
amp.hooks | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | — | Hooks are stored as an array under the 'amp.hooks' key inside '.amp/settings.json' (workspace) or user-scope settings; they are not a standalone hooks file. |
amp.hooks | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | — | Hook definitions live as an array in Amp settings files (.amp/settings.json or user-scope settings). |
amp.permissions | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | — | Ordered first-match-wins rule system under 'amp.permissions' with allow/reject/ask/delegate actions and per-context defaults. |
context | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | — | Optionally scopes a rule to main thread, sub-agent only, or both (omitted); defaults differ by context. |
matches | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | — | Match values support globs, regex (slash-delimited), arrays (OR), literals, and nested objects with dot notation. |
Other features
Behaviors, conventions, and capabilities that aren't tied to a single named field — things like path-based activation, discovery rules, and lifecycle behavior.
| Feature | Conversion | Summary |
|---|---|---|
decision_control | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Pre-execute 'send-user-message' action cancels the pending tool call and injects a user message; exit code 0 = allow, non-zero = block |
permission_control | Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | permissions_system: Amp has a permissions system that hooks interact with to make tool availability decisions |
| Permissions CLI (amp permissions) | Not portable Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | 'amp permissions' subcommands (list/add/edit/test) manage rules in a UNIX-shell-style text format without editing JSON. |
Sources
| Source |
|---|
| https://ampcode.com/manual/hooks.md |
| https://ampcode.com/manual/appendix/permissions-reference.md |