trudi-stop-watcher

trudi-stop-watcher is a command for Claude Code from nebulae/trudi. It costs 23 tokens per session (501 once invoked), scanned A, original, MIT.

A command that stops TRUDI live-monitoring watchers for a case. A watcher is a background process that observes events and produces alerts.

In plain words
What is it for?
Use it to find active watchers for a case, stop each one, and remove the related TRUDI event records.
Why use it?
It prevents those background watchers from continuing to drain new alerts after monitoring should end.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to find active watchers for a case, stop each one, and remove the related TRUDI event records.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nebulae/trudi/trudi-stop-watcher
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.

Clone the repo
git clone --depth 1 https://github.com/nebulae/trudi

Made for: Claude Code.

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 trudi-stop-watcher

README.md
[![agentmods](https://agentmods.dev/badge/commands/nebulae/trudi/trudi-stop-watcher.svg)](https://agentmods.dev/commands/nebulae/trudi/trudi-stop-watcher)
Your own site
<a href="https://agentmods.dev/commands/nebulae/trudi/trudi-stop-watcher"><img src="https://agentmods.dev/badge/commands/nebulae/trudi/trudi-stop-watcher.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 501 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00023 $0.00501
Opus 5 $0.00012 $0.00251
Sonnet 5 $0.00005 $0.00100
Haiku 4.5 $0.00002 $0.00050

Measured 8d ago against content hash f74aae6b55b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

trudi-stop-watcher 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.

claude/commands/trudi-stop-watcher.md · 55 lines

What it actually says

/trudi-stop-watcher

Stops the live-monitoring watcher sidecar(s) for a case: SIGTERMs the detached trudi-velo-watcher.py process(es) and removes the Custom.TRUDI.* artifacts from the client event table so no new alerts are drained.

The argument, if supplied, names the case. Otherwise read it from ~/cases/.common/active_case.

Steps

1. Resolve the case

case_id = $ARGUMENTS if non-empty, else cat ~/cases/.common/active_case. Refuse if neither is set.

2. Ensure an execution log is active (gate prerequisite)

If core.execution_log.log._path is unset, call misc.start_execution_log(case_id, output_path="~/cases/<case_id>/analysis/<case_id>_trace.json") so monitor.* calls pass the DAIR cold-start gate.

3. Enumerate watchers

monitor.list_watchers(case_id)

Each record carries the client_id, alive/dead state, uptime, and alert count. If none are alive, print "No live watchers for <case_id>." and exit (nothing to stop).

4. Stop each alive watcher

For every watcher reported alive:

monitor.stop_watcher(client_id=<from the record>, case_id=case_id)

The response reports killed_pid, whether the stop was graceful, and event_table_cleared. If a pid_file lingers for an already-dead process, note it (it's harmless; start_watcher overwrites it).

5. Report

List each stopped watcher: client_id, killed pid, graceful/forced, event-table-cleared. State that no further alerts will be drained until /trudi-start-watcher is run again.

Notes

  • Stopping the watcher does not clear already-drained alerts, investigation traces, or response suggestions — use /trudi-clear-case for that.
  • The victim host itself is untouched — this only stops TRUDI's collection of its events.
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. 8d ago First seen · 55 lines · 23 tokens per session scan A f74aae6b55b5

Subscribe to this mod's changes

trudi-stop-watcher is a command published in the GitHub repository nebulae/trudi (57 stars, last pushed 7d ago), licensed MIT. It adds 23 tokens to every session and 501 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.