Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

539 Commits

Repository files navigation

failproof ai

npmCISupply ChainDiscordDocsLicense

Translations:简体中文 · 日本語 · 한국어 · Español · Português · Deutsch · Français · Русский · हिन्दी · Türkçe · Tiếng Việt · Italiano · العربية · עברית

Runtime failure resolution for coding agents. Hooks into Claude Code and Codex. Catches loops, dangerous actions, and secret leaks before they become incidents. Zero latency. Runs locally.

Failproof AI in action


Supported agent CLIs

Claude CodeOpenAI CodexGitHub CopilotCursor AgentOpenCodePi
HermesOpenClawFactory DroidDevin CLIAntigravity CLIGoose

Install

npm install -g failproofai
failproofai policies --install # or just run `failproofai` and accept the first-run prompt
failproofai

30 built-in policies activate immediately. Dashboard at localhost:8020. Disable the first-run prompt with FAILPROOFAI_NO_FIRST_RUN=1.


What it stops

PolicyWhat it blocks
block-push-masterDirect pushes to main / master
block-force-pushgit push --force
block-work-on-mainCommits, merges, rebases on main / master
block-rm-rfRecursive file deletion
sanitize-api-keysAPI keys leaking into agent context

All 30 built-in policies


Your own policies

Drop a file into .failproofai/policies/ — it loads automatically, no flags needed. Commit it and the whole team gets it on next pull.

import{customPolicies,deny,allow}from"failproofai";customPolicies.add({name: "no-production-writes",match: {events: ["PreToolUse"]},fn: async(ctx)=>{if(ctx.toolInput?.file_path?.includes("production"))returndeny("Writes to production paths are blocked.");returnallow();},});

Three decisions available to every policy:

DecisionEffect
allow()Permit the operation
deny(message)Block it — message goes back to the agent
instruct(message)Let it through, but add context to the agent's next prompt

Custom policies guide


Session visibility

Every tool call your agent makes is logged locally. The dashboard shows what ran, what was blocked, and what the policy told the agent — so you're not guessing when something goes wrong. → Dashboard guide


Documentation

Getting StartedInstallation and first steps
Built-in PoliciesAll 30 policies with parameters
Custom PoliciesWrite your own
ConfigurationConfig scopes and merge rules
DashboardSession monitor and policy activity
ArchitectureHow the hook system works

License

MIT with Commons Clause — free for internal and personal use; commercial resale of failproofai itself requires a separate agreement. See LICENSE for the full text.


Contributing

See CONTRIBUTING.md. New policies, edge cases, and translations all welcome.

Build before you start. Run bun install && bun run build first. This repo runs failproofai's own hooks on itself, and they resolve the failproofai import against the compiled dist/ bundle — without a build you'll hit Cannot find package 'failproofai' hook errors. Rebuild after changing src/. See Build before the in-repo dev hooks will work.


Built with ❤️ by befailproof.ai in SF and Bengaluru.

About

Runtime failure resolution for coding agents. Hooks into Claude Code, Codex & your favourite harnesses. Catches loops, dangerous actions, and secret leaks before they become incidents. Zero latency. Runs locally.

Topics

Resources

Contributing

Security policy

Stars

1.1k stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages