# How do I make Amp ask before risky tool calls?

> One command puts a fail-closed Immiscible hook in front of Amp, so a force push, a deploy or a secret leaving the machine is refused or waits for a person, by the same rules as every other coding agent.

Source: https://immiscible.fly.dev/docs/answers/amp-agent-safety

Run `npx immiscible guard --agents amp`. It puts one fail-closed hook in front of Amp: a plugin file, `~/.config/amp/plugins/immiscible.js`, whose `tool.call` handler runs the same hook for shell commands, `edit_file`, `create_file`, `apply_patch`, MCP tools and every other tool that is not a local read (web search and fetch among them). With no account the hook decides on your machine and sends nothing; `--connect` sends the questions to your workspace, so approvals reach Slack, Teams, email or your phone. `guard` and these hooks are in the next CLI release, 0.3.0, not yet on npm; until then, run it from a checkout of the repository.

## What does it stop?

The same rules as for Claude Code and the other agents: a force push to `main` or a release branch, `rm -rf` of the root or home directory and a secrets file sent off the machine are refused; publishing a package, `terraform apply`, `kubectl` against production and the network after a secret was read are asked about. A refusal is `reject-and-continue`, so Amp reads the reason and carries on; a call that needs a person is held while someone answers (up to four minutes).

## What if Immiscible cannot be reached?

The call is refused, with the reason. A missing hook file, a missing `node` or a crash refuses it too: the hook fails closed, so an outage never lets a call through unchecked.

## Anything specific to Amp?

For a whole Amp workspace, an admin adds the same plugin file as a workspace plugin in Amp's Workspace Settings. The details, and every file each agent reads, are in [hooks for other coding agents](https://immiscible.fly.dev/docs/guides/coding-agent-hooks.md).

## What does it not do?

- It governs the calls the hook sees: shell commands, file writes, web tools and MCP tools. Model inference Amp runs on its vendor's own servers does not pass through it.
- It does not read or change your code. `immiscible scan` (from 0.3.0) does not read Amp's own history; once guarded, it counts the calls the hook let through, from the guard's own log.
