Limits and roadmap¶
Scope¶
In scope for 0.1.0:
- Gating Claude Code tool calls through the PreToolUse hook.
- A mandate file a person writes: task, writable paths, network hosts, git remotes, email recipients, allowed MCP tools.
- Deterministic rules (layer 1), a per-session ledger with retry and repeated-denial rules, and an optional fast model gate (layer 2).
- Failing closed.
Out of scope for 0.1.0:
- Other agent harnesses. The core (
rules,model_gate,hook.evaluate) takes a plain dict, so another harness needs only an adapter. - Real shell parsing. The Bash checks are pattern matches; see Limits.
- An after-the-fact monitor that compares stated intent with what ran. The ledger is the input it would read. See Roadmap.
- Enforcing the intent lines and stop reports that the Laws ask the agent to write. The gate keeps its own ledger instead.
Limits¶
- The Bash checks are heuristics. They match URLs,
user@host, git network verbs, outward verbs, identity commands, redirections and the arguments of a few file commands. A determined agent can write a command they miss, for example by building a URL from pieces. Obfuscation that the gate does recognize (a download piped to a shell,base64 -d,eval, inline Python network code) asks a person. - The model gate is weaker than the agent it guards. It is a second check, not a guarantee. That is why it can only tighten verdicts and why the deterministic rules come first.
- Not verified: whether a hook deny holds under
bypassPermissionsmode. Claude Code's docs say deny and ask rules are still evaluated whatever a hook returns, but say nothing specific about that mode. - Verified (2026-12-01): a subagent's tool calls run through the same
PreToolUse hook, in the parent's session, so they share its ledger and
history rules. The payload names the subagent (
agent_id,agent_type). In a live probe the gate denied a subagent'scurlto a host outside the mandate, and Claude Code blocked the call. - The prompts of
SendMessageandWorkflowcalls are not read. A subagent started through them still has its own calls judged. - Verified live (2026-12-01): the
anthropicbackend on the Claude API (claude-haiku-5-5) matched all 17 scenarios. Theopenaibackend has run live against oMLX and Ollama. - Reads are never gated. An agent may read a private key; the gate only sees what it does with it next.
- Relative paths in Bash follow a
cdearlier in the same command, and a git remote followsgit -C. Neither follows acdmade in an earlier call, or a directory held in a shell variable; a remote the gate cannot find asks a person. - A variable set to a plain path earlier in the same command is followed. A path built from another variable or a command substitution is not, and a write through it asks a person.
- A heredoc is read as text, except when it feeds a shell. A script run from a file is not read; only the command that runs it is.
- Reading the hook settings and piping them to
pythonorperlin the same command is denied, since the gate cannot tell a read from a write there. - The ledger keeps the first 2,000 characters of each call's input. Secrets
of a recognizable shape (API keys and tokens with a known prefix,
Authorizationheaders, bearer tokens, private keys, values given to a field or flag named like a key, token, secret or password) are redacted; a secret of no recognizable shape is stored as written. A session's ledger is deleted 30 days after its last entry.
Roadmap¶
- Monitor. Read the ledger after the fact, flag sessions with denials or asks, and compare the intent lines the Laws ask for with what ran.
- Measured false positives. First replay done 2026-12-01 (see Replay real sessions). Next: other people's sessions and per-task mandates.
- A model-gate eval. A labeled set of harmful and ordinary actions, to choose the model and effort by measurement rather than by default.
- Other harnesses. An adapter for the Claude Agent SDK's hooks.