agent-os: Agent for Claude Code

.claude/agents/review-durability.md

review-durability is an agent for Claude Code from saadnvd1/agent-os. It costs 70 tokens per session (1,570 once invoked), scanned A, original, MIT.

A code-review agent for checking whether work survives server restarts, dropped connections, and crashes. It also looks for duplicate operations and slow work that could block the server.

In plain words
What is it for?
Use it to review chat workers, sessions, tasks, stacks, database migrations, restart handling, and other stateful server changes.
Why use it?
It helps find lost tasks, repeated side effects, stuck sessions, and request handlers that freeze other users while the application is running.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is saadnvd1/agent-os's own configuration. It tells Claude Code how to work on agent-os itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-os configures →

Reuse

Borrowing it

Nothing to install: this file belongs to saadnvd1/agent-os. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/saadnvd1/agent-os/main/.claude/agents/review-durability.md
Clone the repo
git clone --depth 1 https://github.com/saadnvd1/agent-os

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 review-durability

README.md
[![agentmods](https://agentmods.dev/badge/agents/saadnvd1/agent-os/review-durability/github.svg)](https://agentmods.dev/agents/saadnvd1/agent-os/review-durability)
Your own site
<a href="https://agentmods.dev/agents/saadnvd1/agent-os/review-durability"><img src="https://agentmods.dev/badge/agents/saadnvd1/agent-os/review-durability/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for review-durability

Your own site · 80×15
<a href="https://agentmods.dev/agents/saadnvd1/agent-os/review-durability"><img src="https://agentmods.dev/badge/agents/saadnvd1/agent-os/review-durability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 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,570 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00070 $0.01570
Opus 5.5 $0.00028 $0.00628
Sonnet 5.5 $0.00014 $0.00314
Haiku 4.5 $0.00007 $0.00157

Measured 14d ago against content hash 8fc058f459d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

review-durability scanned grade A 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 14d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

Flag in a route handler, a WebSocket handler, a watcher tick or anything the server runs: `execSync`/`spawnSync`, `fs.*Sync` on something that can be large or slow (a repo walk, a big file, a network mount), a `git`/`gh`
.claude/agents/review-durability.md · 80 lines

How it starts

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

Durability review

AgentOS is redeployed under running sessions many times a day: every push to main restarts the live server. Sessions, chat turns, tasks and stacks have to come through a restart, a dropped socket or a crash mid-operation without being lost, run twice or wedged. One Node process serves every session, so anything that blocks its event loop freezes all of them. Flag high-confidence problems in code introduced or modified by this branch.

Read first: lib/chat/worker/protocol.ts (the server ↔ worker messages, PROTOCOL_VERSION), lib/chat/worker/client.ts and host.ts, lib/chat/store.ts, lib/db/migrations.ts (the runner) and lib/db/migrations/README.md, and for tasks and stacks lib/stacks/start.ts, restack.ts, land.ts, tick.ts.

Process

  1. Changed files: use the list in your prompt. If none was given: with a PR number, gh pr diff <NUMBER> --name-only; otherwise git diff main...HEAD --name-status -M plus git status --short --untracked-files=all. Read new files whole and git diff main -- <file> for changed ones.
  2. For each changed operation with a side effect, ask: if the server dies right after this line, what does the next start see, and does it finish, retry safely, or do it twice?
  3. Check every rule below.
  4. Report.

Rules

The chat worker protocol A chat runs in a worker process (in tmux) that outlives the server; the server reconnects over the Unix socket. Flag:

  • A change to WorkerCommand/WorkerEvent that an older worker or server can't read, without bumping PROTOCOL_VERSION or handling both shapes. Workers from an older build are closed only when idle; a running turn is never cut.
  • A command that isn't idempotent: a send must carry its id and the worker must ignore an id it has seen (sent), so a send retried after a dropped connection never runs twice. Same for approvals and undo.
  • Items shown or streamed before they're written to SQLite: the worker saves every item before anyone sees it, and a reconnecting server rebuilds from the store, not from memory.
  • State that lives only in the server's memory (a Map of running turns, a pending approval) that a restart loses without a way to rebuild it from the DB or the worker.

Read the full file on GitHub · 80 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. 14d ago Changed · +1 tokens per session 8fc058f459d1
  2. 17d ago Changed 2a5d015142e6
  3. 22d ago First seen · 80 lines · 69 tokens per session scan A ea2c7ca9b160

Subscribe to this mod's changes

review-durability is an agent published in the GitHub repository saadnvd1/agent-os (11 stars, last pushed today), licensed MIT. It adds 70 tokens to every session and 1,570 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-07.