reaper

A command that scans Dolt databases for old temporary work items and stale issues, closes or deletes them according to age limits, and removes old closed messages. Dolt is a database system with Git-like version tracking.

In plain words
What is it for?
Use it to find stale work items across production databases, close old issues, purge older records, monitor open-item counts, or perform a dry run.
Why use it?
Temporary records and abandoned issues can accumulate and make operational databases harder to manage. The command also checks server health and can report what it would do without changing data.

Command for Claude Code

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 commands/gastownhall/gastown/reaper
Clone the repo
git clone --depth 1 https://github.com/gastownhall/gastown

Made for: Claude Code.

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 902 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.00902
Opus 5 $0.00012 $0.00451
Sonnet 5 $0.00005 $0.00180
Haiku 4.5 $0.00002 $0.00090

Measured yesterday against content hash 03582bff5c69, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

reaper 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 yesterday.

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/reaper.md · 121 lines

How it starts

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

Wisp Reaper

Reap stale wisps and close stale issues across all production Dolt databases. Runs the same cycle as mol-dog-reaper but directly, without Dog dispatch.

Arguments: $ARGUMENTS If --dry-run is passed, report counts without making changes.

Configuration Defaults

Parameter Default Description
max_age 24h Wisps older than this are reaped (closed)
purge_age 72h Closed wisps older than this are purged (deleted)
stale_issue_age 168h Issues stale longer than this are auto-closed
mail_delete_age 72h Closed mail older than this is purged
alert_threshold 3000 Open wisp count that triggers escalation
dolt_port 3307 Dolt server port

Execution Steps

Step 1: Verify Dolt server health

gt dolt status

If the server is unhealthy or unreachable, STOP and escalate:

gt escalate "Reaper blocked: Dolt server unhealthy" -s HIGH

Step 2: Discover databases

gt reaper databases --json

This lists all production databases on the Dolt server. Expected databases: hq, beads, gastown (and any rig-specific DBs).

Step 3: Scan each database for candidates

For each database returned in Step 2:

gt reaper scan --db=<name> --port=3307 \
  --max-age=24h --purge-age=72h \
  --mail-age=72h --stale-age=168h \
  --json

Inspect the JSON output:

  • reap_candidates: wisps eligible for closing
  • purge_candidates: closed wisps eligible for deletion
  • open_wisps: total open wisp count
  • anomalies: array of detected problems

If open_wisps exceeds 3000 across all databases, note for escalation. If no candidates found across all databases, report "nothing to reap" and stop.

Step 4: Reap stale wisps

For each database with reap candidates:

gt reaper reap --db=<name> --port=3307 --max-age=24h [--dry-run] --json

IMPORTANT: Scan/reap count mismatch is NORMAL (witness closes wisps concurrently). Do NOT escalate scan > reap mismatches. Only escalate actual errors.

Read the full file on GitHub · 121 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. yesterday First seen · 121 lines · 23 tokens per session scan A 03582bff5c69

Subscribe to this mod's changes

reaper is a command published in the GitHub repository gastownhall/gastown (17,849 stars, last pushed 13d ago), licensed MIT. It adds 23 tokens to every session and 902 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.