Clawback: Hooks-based implementation of leaked Claude verification loops

✍️ OpenClawRadar📅 Published: April 15, 2026🔗 Source
Clawback: Hooks-based implementation of leaked Claude verification loops
Ad

Clawback is a GitHub project that implements the verification loops from the leaked Claude source map as mechanical hooks rather than prompts. The approach addresses the limitation where prompt-based verification (like iamfakeguru/claude-md's "you are FORBIDDEN from completing without running tsc") can be skipped by the model under context pressure.

Hook architecture

The system splits the problem into two layers:

  • Hooks (mechanical, can't be skipped):
    • Stop hook: Runs typecheck + lint when Claude tries to complete. If it fails, exits with code 2, forcing Claude to keep fixing. Three consecutive failed blocks trigger a circuit breaker.
    • PostToolUse: Auto-formats and lints after every file edit.
    • PreToolUse: Blocks edits to .env and lockfiles before Claude touches them.
    • PostCompact: Re-injects git state and gotchas.md after context compaction.
  • CLAUDE.md (behavioral): For what hooks can't enforce, including phased execution (≤5 files per phase), plan vs build separation, context decay awareness, and mistake logging.
Ad

Technical details

The tool auto-detects the stack by looking for configuration files: tsconfig.json, go.mod, Cargo.toml, pyproject.toml, and composer.json. It requires no configuration and has zero dependencies. Clawback works alongside iamfakeguru's CLAUDE.md project, not instead of it.

The implementation is based on the leaked verification loops that were gated behind USER_TYPE === 'ant' in the source map. The GitHub repository is available at https://github.com/LZong-tw/clawback.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also