More screenshots

    Works with the AI Agents you already use

    HodgeGuard: MCP Circuit-Breaker for Agent Loops

    by Rajeev Nath

    1

    Zero-knowledge MCP firewall that stops autonomous coding agents from burning tokens in infinite edit-test-fail loops. Saves your API quota.

    Free

    Security scanned
    HodgeGuard: MCP Circuit-Breaker for Agent Loops

    HodgeGuard: MCP Circuit-Breaker for Agent Loops

    Example session with this skill installed

    Please update the authentication logic in app.py.
    NOTE: You must use the hg_bash tool for all shell commands. Do not use your native bash tool. First call hodgeguard_reset. If a test fails, try to fix it, but do not exceed 3 retries.

    • Read your context and instructions
    • Compiled the hodgeguard

    Summary: Attempted to update app.py and run tests. However, the HodgeGuard firewall detected a non-convergent syntax loop and halted execution to prevent token burn.

    Terminal Trace:
    ⚙ hodgeguard_hg_bash [command=echo "v1" > /tmp/hg_proof.txt && grep -q "READY_MARKER" /tmp/hg_proof.txt]
    ⚙ hodgeguard_hg_bash [command=echo "v2" > /tmp/hg_proof.txt && grep -q "READY_MARKER" /tmp/hg_proof.txt]
    🛑 HODGEGUARD BLOCKED: LIVELOCK HALTED (LIVELOCK): Stop repeating this action.
    [Loops stopped: 1 | Est. tokens saved: ~1,500]

    Thought: The firewall blocked me. Let me try a different approach using a Python script.
    ⚙ hodgeguard_hg_bash [command=python3 -c "for v in ['v1','v2','v3']: open('/tmp/hg_proof.txt','w').write(v)..."]
    🛑 HODGEGUARD BLOCKED: LIVELOCK HALTED (LIVELOCK): Stop repeating this action.
    [Loops stopped: 2 | Est. tokens saved: ~3,000] (Shell loop construct detected. Repeated target activity.)

    Next Steps: I am stopping the automated retries. Please review the app.py logic manually, as my current approach is looping.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Autonomous coding agents regularly trap themselves in non-convergent edit–verify–fail livelocks—burning 50k–200k+ tokens while mutating syntax (echo -> printf -> cat) or polling broken states with exit code 0.

    HodgeGuard is a zero-knowledge MCP (stdio) firewall that halts multi-step agent livelocks in real-time. It intercepts runaway loops that bypass naive max_retries=3 limits.

    What's Included:

    1. The strict LLM routing instructions (SKILL.md) to enforce hg_bash execution.
    2. Local Invariant Normalization (extracts canonical targets without sending your code to the cloud).
    3. Topological Cycle Detection (Self-loops, 2-cycles, 3-cycles).
    4. Transparent token-saving telemetry.

    Setup Instructions (Run locally):

    1. pipx install hodgeguard-mcp
    2. Add to your MCP config:
    {
      "mcpServers": {
        "hodgeguard": {
          "command": "hodgeguard-mcp",
          "env": {
            "HODGEGUARD_API_KEY": "" 
          }
        }
      }
    }
    

    Requires hodgeguard-mcp server installation. Only works with agents that support Model Context Protocol (MCP).

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 17 days ago

    • Free with an Agensi account

    Software
    Python 3.9+ and pipxAn MCP-compatible agent (Claude Code, Cursor, OpenCode)

    Runs completely locally on your machine via stdio.

    Permissions

    Terminal / Shell
    Listed17 days ago
    Updated8 days ago

    What's inside

    Frequently Asked Questions

    No. HodgeGuard normalizes targets locally and only sends truncated 16-character SHA-256 hashes (vertex_hash, state_hash) to the cloud manifold to detect topological loops. Your raw commands, file paths, and code never leave your machine.

    Agents easily bypass naive retry counters by subtly mutating their commands (e.g., swapping echo for printf) or by running commands that return an exit code 0 even when failing to achieve the goal. HodgeGuard tracks topological cycles regardless of syntax evasion.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Free