━━ failproof ai · field guides
guides
every failproof guide and how-to in one place - the specific fix for the specific failure. stop dangerous commands, block rm -rf, keep secrets out of the context window, handle agent failures, and observe, replay, and query every run.
━━ specific failure modes
- f·1
AI agent stuck in a loop - how to break it
Why coding agents retry the same failing step forever, how to detect the loop, and the hook-level policy that breaks it, summarizes progress, and restarts clean.
→ - f·2
Agent hallucinated a tool or file - how to stop it
When the agent calls a tool, file, or API that does not exist, block the invented call at the hook layer and hand the agent what does exist nearby instead.
→ - f·3
Agent context drift - keep agents on task
Agents wander off the original goal as context fills up. Detect the drift and pull the agent back to what it was actually asked to do, at the hook layer.
→ - f·4
Agent won't stop after finishing - how to end the run
The task is done but the agent keeps going, editing more, spending more, risking more. Stop the run the moment intent is complete and surface the result.
→
━━ reliability & failure handling
- g·1
AI failure handling for production agents
The five failure categories, why retries don't cut it, and how harness hooks become the enforcement primitive.
→ - g·2
LLM agent reliability - closing the production gap
The reliability gap between demo and production, the 3U framework, and hook-level enforcement across every supported harness.
→ - g·3
Agent error recovery - detect, mitigate, continue
The retry / repair / block taxonomy and the recovery strategy mapped to every failure mode failproof catches.
→
━━ safety & policy enforcement
- g·4
How to stop Claude Code from running dangerous commands
Install failproof, register the PreToolUse hooks, and the destructive command classes - rm -rf, sudo, curl | sh, force push, terraform destroy - stop at the hook layer.
→ - g·5
Claude Code safety hooks - complete setup guide
PreToolUse, PostToolUse, Stop. The 39 built-in policies grouped by category. Three configuration scopes. Custom JS policies.
→ - g·6
How to block rm -rf in Claude Code
The block-rm-rf policy in detail - every recursive flag shape it catches, the safe-path allowlist, and what the agent sees when a delete is denied.
→ - g·7
How to prevent Claude Code from accessing .env files
Two PreToolUse blockers plus five PostToolUse sanitizers - keep secrets out of the agent context window, even when the agent legitimately reads a related file.
→ - g·8
How to prevent AI agent force push
block-force-push, block-push-master, block-work-on-main. One engine, every harness - Claude Code, Codex, Cursor, Gemini CLI, Copilot, picode, opencode.
→ - g·9
How to sandbox Claude Code terminal access
Policy sandbox without a container or VM - PreToolUse confinement, PostToolUse sanitization, Stop gates. Stack a container on top only when you need a kernel boundary too.
→
━━ observability & debugging
- g·10
AI agent observability - see what your agents did
Why logs aren't enough for agents, the four pieces of real observability - live event stream, session replay, queries, alerts - and how agenteye ingests every run in realtime.
→ - g·11
Agent session replay - debug every run span by span
Replay any run on the trace rail, expand a span to the raw model or tool call, and see exactly where the agent looped, drifted, or got blocked.
→ - g·12
Query agent traces in SQL
SQL and a visual builder over every event, session, and eval - find failure patterns across thousands of runs, save them to dashboards, and turn them into alerts.
→ - g·13
Agent failure alerting - catch breaks in real time
Trigger on a metric, a saved query, or an eval score; open an incident your team can triage; and pull the alert into your local Claude via the CLI and MCP.
→