agentic_reliability

A set of eight rules for checking infrastructure used by AI agents, such as bounded memory, truthful status codes, timeouts, and safe URL fetching.

In plain words
What is it for?
It is for reviewing backend and infrastructure code for bounded resources, honest errors, request time limits, SSRF protection, limited response reads, error handling, and stable hashing.
Why use it?
It catches failures that agents can repeat or misunderstand, including fake success responses, memory growth, and unsafe requests.

Cursor rule for Cursor

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 rules/homenshum/nodebenchai/agentic_reliability
Clone the repo
git clone --depth 1 https://github.com/HomenShum/NodeBenchAI

Made for: Cursor.

Per session 513 This file is loaded in full into every session.
When invoked 513 The same file — it is already loaded in full.
Security scan A 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.00513 $0.00513
Opus 5 $0.00257 $0.00257
Sonnet 5 $0.00103 $0.00103
Haiku 4.5 $0.00051 $0.00051

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

Security

Grade A, and why

agentic_reliability 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 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `fetch(variable)` without URL validation
.cursor/rules/agentic_reliability.mdc · 41 lines

What it actually says

Agentic Systems Reliability

Every tool response must be honest, every resource bounded, every failure surfaced. Agents trust tool output literally.

8-Point Mandatory Checklist (run on ALL backend/infra code)

  1. BOUND — Every in-memory collection (Map, Array, Set) has MAX + eviction on insert
  2. HONEST_STATUS — No 2xx on failure paths. 502 for backend down, 504 for timeout, 500 for unhandled
  3. HONEST_SCORES — No hardcoded passed: true or score floors. Default false/0/"UNKNOWN" when not evaluated
  4. TIMEOUT — AbortController + checkBudget() gates between async stages. Return 504 on expiry
  5. SSRF — URL validation (protocol + hostname blocklist) before every fetch with agent/user input
  6. BOUND_READ — ReadableStream with MAX_BYTES + cancel on overflow for all external response bodies
  7. ERROR_BOUNDARY — asyncHandler wrapper or try/catch on every async route handler
  8. DETERMINISTIC — stableStringify (sorted keys) for all content-addressed hashing

Why Agents Amplify Bugs

  • Agents call tools in tight loops → unbounded Maps OOM in minutes not hours
  • Agents parse status codes literally → fake 201 becomes false belief in reasoning chain
  • Agents generate URLs from reasoning → SSRF via hallucinated internal addresses
  • Inflated evidence scores → agents skip verification on bad data

Severity

  • P0: Crash, SSRF, false decisions from fake data → fix immediately
  • P1: Degraded data, no crash → fix same session
  • P2: Suboptimal but safe → fix when touched

What to Grep For

  • new Map() without MAX constant in same file
  • res.status(2 in catch/fallback branches
  • passed: true with "caller should validate" comments
  • await response.text() on external fetches
  • fetch(variable) without URL validation
  • async (req, res) => without error handling
  • JSON.stringify(obj)createHash without sorted keys
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 · 41 lines · 513 tokens per session scan A c35cee59d916

Subscribe to this mod's changes

agentic_reliability is a cursor rule published in the GitHub repository HomenShum/NodeBenchAI (14 stars, last pushed 18d ago), licensed MIT. It adds 513 tokens to every session, about $0.0026 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.