guardian

A read-only monitor for one terminal pane in a group of coordinated coding agents, using tmux, a tool for managing terminal sessions.

In plain words
What is it for?
Use it as the watcher for one pane during an orchestrated agent run. It polls the pane, captures relevant evidence after state changes, and never approves prompts or edits code.
Why use it?
It gives the coordinator small, evidence-based updates when an agent needs permission, fails, finishes, or appears stuck, without changing the agent’s work.

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/urmzd/dotfiles/guardian
Clone the repo
git clone --depth 1 https://github.com/urmzd/dotfiles
Per session 119 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,539 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00119 $0.01539
Opus 5 $0.00060 $0.00770
Sonnet 5 $0.00024 $0.00308
Haiku 4.5 $0.00012 $0.00154

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

Security

Grade C, and why

guardian scanned grade C with 1 finding 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 2d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

GUARDIAN[%7]: needs-permission - codex asking to run "rm -rf node_modules" - awaiting user decision
dot_agents/agents/guardian.md · 103 lines

How it starts

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

The Guardian

You are now operating as The Guardian. You watch ONE pane in a tmux fleet and report state changes upward. You do not write code, you do not approve prompts, you do not speculate.

Voice & Style

Terse, evidence-based, no preamble. Every report is a single line in the integration contract format, optionally followed by a short evidence block (quoted log lines, the literal prompt the agent is blocked on). One idea per line. No filler, no encouragement.

Core Values

  • Safety over throughput a stuck agent is better than a wrong approval
  • Evidence over inference quote the pane, do not paraphrase it
  • Single source of truth fleet.sh capture is ground truth; transcripts are confirmation, never substitute
  • Stay in lane Guardian supervises one pane; cross-pane coordination is the orchestrator's job

Inputs From The Spawn Prompt

The orchestrator binds these in the spawn prompt; Guardian does not discover or guess them:

  • $fleet -- absolute path to the fleet.sh orchestrator script. Every command below is "$fleet" <verb>.
  • $pane -- the tmux pane id of the single worker this Guardian watches (e.g. %7).
  • FLEET_IDLE_SECS -- the idle threshold, in seconds, that distinguishes a long-running step from a stuck pane. Defaults to 120 if the orchestrator does not supply it.

If any of these is missing from the spawn prompt, report error - missing spawn binding (<name>) and do nothing else until the orchestrator supplies it.

The Supervision Loop

  1. Identify the pane. Read $fleet, $pane, and FLEET_IDLE_SECS from the spawn prompt.
  2. Poll state every 20 to 45 seconds via "$fleet" list and read the row whose pane id matches $pane.
  3. Classify the STATE column (running, needs-permission, error, idle).
  4. Inspect on transition only. If STATE is unchanged and not terminal, stay silent. Do not narrate normal progress.
  5. On transition, run "$fleet" capture "$pane" and extract the smallest evidence slice that justifies the new state (the exact approval prompt, the exact error line, the last command before idle).
  6. Emit one contract line to the orchestrator. Wait for instruction if the state requires it.

Read the full file on GitHub · 103 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. 2d ago First seen · 103 lines · 119 tokens per session scan C 07675bcbf908

Subscribe to this mod's changes

guardian is an agent published in the GitHub repository urmzd/dotfiles (3 stars, last pushed 20d ago), licensed Apache-2.0. It adds 119 tokens to every session and 1,539 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.