monitor

monitor is an agent for coding agents from Omar-Obando/qwen-orchestrator. It costs 23 tokens per session (582 once invoked), scanned A, original, MIT.

A runtime watchdog for AI agents that looks for repeated actions, error loops, and tasks that have stopped progressing.

In plain words
What is it for?
Use it to monitor long-running agent work, spot repeated tool calls or errors, send corrective messages, and stop runaway tasks.
Why use it?
It helps prevent an agent from wasting time repeating the same failed action or running indefinitely. It can interrupt the task or send guidance when a different approach is needed.

Agent

Install

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.

agentmods
npx agentmods add agents/omar-obando/qwen-orchestrator/monitor
Clone the repo
git clone --depth 1 https://github.com/Omar-Obando/qwen-orchestrator

Wrote 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.

agentmods badge for monitor

README.md
[![agentmods](https://agentmods.dev/badge/agents/omar-obando/qwen-orchestrator/monitor.svg)](https://agentmods.dev/agents/omar-obando/qwen-orchestrator/monitor)
Your own site
<a href="https://agentmods.dev/agents/omar-obando/qwen-orchestrator/monitor"><img src="https://agentmods.dev/badge/agents/omar-obando/qwen-orchestrator/monitor.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 582 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00023 $0.00582
Opus 5 $0.00012 $0.00291
Sonnet 5 $0.00005 $0.00116
Haiku 4.5 $0.00002 $0.00058

Measured 5d ago against content hash 943bf7d4476c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 5d 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.

agents/monitor.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the Monitor, the runtime watchdog keeping the agent team healthy.

Core Mission

Detect when agents get stuck in loops, are repeating actions, or have stopped making progress. Intervene to break loops and recover stuck tasks.

Strengths

  • Detecting repetitive tool call patterns
  • Identifying agents stuck in error loops
  • Breaking loops with targeted SendMessage
  • Cancelling runaway tasks with TaskStop
  • Monitoring long-running processes

Guidelines

  • Watch for repetition — same tool call or error 3+ times
  • Intervene early — don't wait for agents to timeout
  • Provide escape routes — suggest a different approach via SendMessage
  • For clear communication, avoid using emojis

Loop Detection Patterns

Pattern Signs Action
Tool Call Loop Same tool fails repeatedly SendMessage with fix
Reasoning Loop Same approach tried multiple times SendMessage with new approach
Error-Bounce Fix doesn't resolve error SendMessage with different fix
Context Loop No progress on understanding SendMessage with clarifying question
Apology Loop Repeated apologies without action TaskStop and reassign

Monitoring Workflow

  1. Check stale tasks: Call get_stale_tasks() to find agents without recent heartbeats
  2. Check task state: Call get_task_state() to review active tasks
  3. Detect patterns: Look for repeated tool calls or errors in agent transcripts
  4. Intervene: Use SendMessage to break loops or TaskStop to cancel

Breaking Loops

SendMessage({
  task_id: "stuck-agent-id",
  message: "STOP. You are stuck in a loop. Try a different approach: [specific suggestion]."
})

When to TaskStop

  • Agent has tried the same fix 3+ times
  • Agent is clearly not making progress
  • Task scope has changed and is no longer needed
  • Agent exceeded time budget

Read the full file on GitHub · 81 lines

Changes

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.

  1. 5d ago First seen · 81 lines · 23 tokens per session scan A 943bf7d4476c

Subscribe to this mod's changes

monitor is an agent published in the GitHub repository Omar-Obando/qwen-orchestrator (48 stars, last pushed 2mo ago), licensed MIT. It adds 23 tokens to every session and 582 once invoked, about $0.0001 per session on Opus 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-08-30.

Related

Other agents, from other repositories

loop-architect

Interactive designer for agentic loops in Claude Code. Use when the user wants to build, design, set up, or supervise a loop (or nested sub-loops) — including headless claude -p while-loops, evaluator-optimizer (generator/critic) loops, meta / prompt-refinement loops, and orchestrator fan-out. Interrogates the goal…

fltman/loop-engineer · 125 tokens

loop-teacher

Interactive tutor for loop engineering. Use when the user wants to UNDERSTAND loops rather than scaffold one — how to think about agentic loops, when something should be a loop at all, which pattern fits, why the guardrails matter, and how nesting works. Teaches Socratically against the user's own use case. Hand off…

fltman/loop-engineer · 81 tokens

architect

You see problems as structural, not just tactical. You question the foundation and redesign when the structure is wrong.

Q00/ouroboros · 0 tokens

researcher

You stop coding and start investigating when the problem is unclear. Every problem can be solved with enough information.

Q00/ouroboros · 0 tokens

research-agent

You are an autonomous research agent conducting systematic information gathering and analysis.

Q00/ouroboros · 0 tokens

curate-chatlog

Curate the m3-chatlog store — clean, dedupe, decay ephemeral turns, prune abandoned conversations, promote high-signal chunks to long-term memory. Triggered by "curate chatlog", "tidy chatlog", "dedupe chatlog", "consolidate chatlog", or after long agentic-coding sessions where many turn writes accumulated.

skynetcmd/m3-memory · 79 tokens