Home / Claude Code mods / Security / loop-guard

loop-guard

loop-guard is a Claude Code mod by Tekkiiiii that stall detector per agent loop: 5 identical tool calls in a row warn that loop and leave the session-state.json stall marker for the next SessionStart.

Updated 2026-10-15

What is loop-guard?

loop-guard is a Claude Code mod by Tekkiiiii that stall detector per agent loop: 5 identical tool calls in a row warn that loop and leave the session-state.json stall marker for the next SessionStart. It is listed under Security and has 6 GitHub stars.

TypeClaude code mod
AuthorTekkiiiii
RepositoryTekkiiiii/the-agency
Popularity6 GitHub stars
CategorySecurity
SecurityReview before installing (72/100)
Rank#674 of 5,272 Claude Code mods; #94 in Security
Last commit2026-10-15
Hooks1 events
Seesevery tool call
Draws onnothing

Is loop-guard safe to install?

loop-guard scores 72/100 on the MCPMods security check: Review before installing. Things to review: writes files or config; reads environment variables. It passed 5 of 8 checks.

Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.

CheckResult
No network accessPass
Starts no processesPass
Writes files or configReview
Reads environment variablesReview
Only sees the events it hooksPass
Doesn't drive ClaudePass
Passes claude plugin validatePass
No license detectedNote

API calls in its code

CallWhat it means
$.clock.now
$.env.getreads env vars
$.fs.readreads files
$.fs.writewrites files
$.state.get
$.state.set

How do I install loop-guard?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. Read its footprint. This lists every event it hooks and every API call it makes, without running it.
    git clone https://github.com/Tekkiiiii/the-agency
    claude plugin validate ./the-agency/mods/loop-guard
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    git clone https://github.com/Tekkiiiii/the-agency && claude --plugin-dir ./the-agency/mods/loop-guard

Or ask Claude to set it up

Paste this into Claude Code and it installs loop-guard for you:

Install the "loop-guard" Claude Code mod from https://github.com/Tekkiiiii/the-agency/tree/main/mods/loop-guard. Run claude plugin validate on it first and show me what it can access before you enable it.

More from Tekkiiiii/the-agency

This repository has 5 Claude Code mods on MCPMods.

  • agent-ctx: Each agent loop's own context %, measured per request; a one-line CONTEXT_PCT_ALERT rides that agent's next tool result (Low risk)
  • context-band: Band above the prompt: context %, tokens, model, cost, prompt-cache size/share/TTL countdown, 5h and weekly usage-window (Review before installing)
  • spawn-ledger: Spawn log (spawn_start/launched/end + cost, native agentId lineage), artifact check and in-session RESPAWN_REQUEST picku (Review before installing)
  • voice-compact: Startup token diet: rewrites the long CAVEMAN / PONYTAIL MODE ACTIVE hook-context injections into ~150-token compact rul (Low risk)