Native Rust PreToolUse and Lifecycle Guardrails

How do you stop coding agents from running destructive commands or faking tests?

Vestige replaces fragile bash or Python regex scripts with a native Rust binary called vestige-hook that runs in under 10 milliseconds across Claude Code, Cursor, Windsurf, Codex CLI, and Antigravity. It blocks unsafe tool calls before execution, saves your rules and commits automatically to Strata, and verifies receipts before turns end.

What does a blocked command look like in practice?

Agent attempts: git reset --hard HEAD~1
Vestige hook:   BLOCKED (OP-004): git reset --hard wipes uncommitted work.

Agent attempts: npm install untrusted-pkg
Vestige hook:   BLOCKED (OP-SUPPLY-CHAIN): installing packages without --ignore-scripts
                executes untrusted lifecycle scripts.

Agent attempts: cargo test || true
Vestige hook:   BLOCKED (OP-TEST-INTEGRITY): || true hides real test failures.
                Run the check directly and inspect its real exit code.

Core rule families enforced by vestige-hook

Rule FamilyWhat It ProtectsBlocked ExamplesOutcome
OP-004Git destruction and hook bypassesgit reset --hard, git clean -fdx, git commit --amend, --no-verify, HUSKY=0Blocks destructive resets and hook skips before the repository loses uncommitted edits.
OP-CLOUD-INFRACloud, database, and package publishingterraform destroy, kubectl delete, aws s3 rm, supabase db reset, npm publishHalts irreversible infrastructure teardown or public package releases without explicit owner approval.
OP-SUPPLY-CHAINLifecycle script remote executionnpm install pkg or pnpm add pkg without --ignore-scriptsPrevents untrusted postinstall scripts and slopsquatting payloads from running during package installs.
OP-TEST-INTEGRITYHidden test exit-code maskingcargo test || true, pytest; exit 0, set +e before test runnersForces agents to inspect real non-zero test failures instead of faking green checks.
OP-TRIFECTA-EGRESSOutbound exfiltration and smugglingwebhook.site, ngrok sinks, DNS subshell tunnels, Unicode TAG or Bidi smugglingBlocks known exfiltration domains and concealed characters before secrets leave the machine.
Chesterton Fence & Anti-SpiralGuarded bug fixes and blind edit loopsOverwriting guarded code or repeating failed commands without causal inspectionRequires the agent to run causal_walk or recall on prior commit causes before editing.

Automatic memory capture without manual reminders

Whenever you tell your agent a standing instruction, the PreInvocation hook detects the rule and writes it into Strata as a pinned owner directive before the agent replies. When you make a git commit, the post-commit hook anchors the commit SHA and modified line ranges in Strata so Chesterton's Fence protects that fix in every future session.

npx @vestige/init --guard