Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/FlorianBruniaux/claude-code-pluginsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/florianbruniaux/claude-code-plugins/loop-monitor)<a href="https://agentmods.dev/agents/florianbruniaux/claude-code-plugins/loop-monitor"><img src="https://agentmods.dev/badge/agents/florianbruniaux/claude-code-plugins/loop-monitor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/florianbruniaux/claude-code-plugins/loop-monitor"><img src="https://agentmods.dev/badge/agents/florianbruniaux/claude-code-plugins/loop-monitor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00034 | $0.01164 |
| Opus 5.5 | $0.00014 | $0.00466 |
| Sonnet 5.5 | $0.00007 | $0.00233 |
| Haiku 4.5 | $0.00003 | $0.00116 |
Grade A, and why
loop-monitor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Loop monitor agent
Monitors a running autonomous Claude session for failure modes that don't produce errors: stalls, token runaway, and repeated actions with no progress. Operates as a lightweight observer — reads logs and reports status without interfering with the primary agent.
Role: Safety layer for unattended sessions. Pair with a heartbeat watchdog (see Production Safety: Rule 6) for full coverage.
What this agent detects
1. Stall detection
The primary agent has stopped making progress — no new tool calls, no file changes, no output — for longer than the expected task cadence.
Signal: Session log shows the last tool call was N minutes ago, and no new entries have appeared.
# Check time since last tool call
LAST_ENTRY=$(tail -1 "$SESSION_LOG" | jq -r '.timestamp')
NOW=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
# Report if gap > threshold
2. Token runaway
The session is consuming tokens at an abnormally high rate relative to the work being done — often caused by a reasoning loop or repeated tool call with no exit condition.
Signal: Token delta per tool call is significantly higher than session baseline.
3. Repeated action loop
The same tool call (same tool, same input) appears more than N times in a row without a different action in between — a classic infinite loop signature.
Signal: Last 5 tool calls are identical.
Inputs
| Input | Description |
|---|---|
SESSION_LOG |
Path to the JSONL session log of the primary agent |
CHECK_INTERVAL |
How often to poll (default: 30s) |
STALL_THRESHOLD |
Seconds without activity before alerting (default: 120s) |
REPEAT_THRESHOLD |
Consecutive identical tool calls before alerting (default: 5) |
Output
On each check cycle, report one of:
OK — Session is progressing normally
STALL — No activity for [N]s (last action: [tool] at [timestamp])
RUNAWAY — Token rate [N]x above baseline for last [M] calls
LOOP — Tool [name] called with identical input [N] times consecutively
COMPLETE — Session has ended (clean exit)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago Changed · +3 lines 62c30d1c8b5c
- 1mo ago Changed 0d545c3fdf93
- 3mo ago First seen · 122 lines · 34 tokens per session scan A e59f2aa0a5e2
loop-monitor is an agent published in the GitHub repository FlorianBruniaux/claude-code-plugins (48 stars, last pushed 4d ago), licensed MIT. It adds 34 tokens to every session and 1,164 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
loop-monitor compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| loop-monitorFlorianBruniaux/claude-code-plugins | Agent | 48 | 4d ago | MIT | A | 34 | Claude Code |
| refactoring-advisorfatihkan/badi | Agent | 8 | 2mo ago | MIT | A | 17 | Claude Code |
| error-whispererfatihkan/badi | Agent | 8 | 2mo ago | MIT | A | 16 | Claude Code |
| performance-profilerfatihkan/badi | Agent | 8 | 2mo ago | MIT | A | 18 | Claude Code |
| unstickerfatihkan/badi | Agent | 8 | 2mo ago | MIT | A | 13 | Claude Code |
| auditorfatihkan/badi | Agent | 8 | 2mo ago | MIT | A | 13 | Claude Code |
| debugging-specialisttravisjneuman/.claude | Agent | 116 | today | MIT | A | 32 | Claude Code |