clawsweeper AGENTS.md

Instructions for using persistent terminal sessions, which keep a shell or interactive program running between commands.

In plain words
What is it for?
They help drive Python, database, and Node.js consoles, handle prompts such as SSH confirmation, and work with programs that require a real terminal.
Why use it?
They preserve directory changes, environment variables, and interactive program state that would otherwise be lost between terminal calls.

Instructions file for CodexOpenCode

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 instructions/openclaw/clawsweeper/agents-md
Clone the repo
git clone --depth 1 https://github.com/openclaw/clawsweeper

Made for: Codex, OpenCode.

Per session 2,007 This file is loaded in full into every session.
When invoked 2,007 The same file — it is already loaded in full.
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.02007 $0.02007
Opus 5 $0.01004 $0.01004
Sonnet 5 $0.00401 $0.00401
Haiku 4.5 $0.00201 $0.00201

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

Security

Grade A, and why

clawsweeper AGENTS.md 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 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.

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.md · 160 lines

How it starts

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

AGENTS.MD

ClawSweeper is the conservative maintenance bot for OpenClaw repositories. Keep changes narrow, evidence-backed, and automation-safe.

AGENTS.md is the canonical repository-wide coding-agent policy. Task-specific workflows under .agents/skills/ are opt-in procedures and do not override this file. This repository does not currently maintain AGENT.md, CLAUDE.md, or Cursor aliases; agents that do not discover AGENTS.md automatically must be directed here rather than given a duplicated policy copy.

Structure

  • Main code: src/clawsweeper.ts.
  • Repair lane code: src/repair/; canonical records live in the Cloudflare Worker, ledger/assets blobs live in R2, and remaining operational state lives in openclaw/clawsweeper-state.
  • Tests: test/*.test.ts and test/repair/*.test.ts; add new coverage to the narrowest matching test file instead of growing test/clawsweeper.test.ts.
  • Workflow: .github/workflows/sweep.yml.
  • Vision and product boundaries: VISION.md.
  • Explainer: README.md; state/dashboard repo: ../clawsweeper-state.
  • Open/reviewed records in the canonical Worker store: records/<repo-slug>/items/<number>.md.
  • Archived records in the canonical Worker store: records/<repo-slug>/closed/<number>.md.
  • Scratch/generated output: .artifacts/, artifacts/, apply-report.json.

Preserve one flat items/ and closed/ report layout per repository slug. Do not split reports into issue/PR subtrees.

Operating Model

  • Review lane is proposal-only. It never closes GitHub items.
  • Apply lane mutates GitHub by syncing the durable Codex review comment and then closing only unchanged, high-confidence proposals.
  • Repository-specific rules live in src/repository-profiles.ts; ClawHub apply may close only PRs that are certainly implemented on main.
  • Worker concurrency is shard-level: each shard processes its selected items sequentially. Maximum parallel Codex sessions equals shard_count, not batch_size * shard_count.
  • openclaw/clawsweeper-state is the live status surface and operational state store; the Worker/R2 pair is authoritative for records, ledger, and assets. Check current Actions and the canonical owner before trusting local generated timestamps.
  • When asked about PRs outside openclaw/clawsweeper, treat the task as monitoring/debugging how ClawSweeper workflows operate on that PR. Do not fix foreign PR branches directly; ClawSweeper repair/automerge workflows own those branch edits.
  • In openclaw/openclaw, CHANGELOG.md is release-owned. Do not ask contributor PR authors, repair workers, or automerge/autofix lanes to edit it during normal PR work. Preserve release-note context in PR bodies and commit messages instead.
  • When referencing GitHub issues or PRs in user-facing output, always include the full GitHub URL, not only #12345.

Read the full file on GitHub · 160 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 · 160 lines · 2,007 tokens per session scan A 14ea39ef8ce4

Subscribe to this mod's changes

clawsweeper AGENTS.md is an instructions file published in the GitHub repository openclaw/clawsweeper (1,969 stars, last pushed today), licensed MIT. It adds 2,007 tokens to every session, about $0.0100 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.