bugs

bugs is an agent for coding agents from Traves-Theberge/openlens. It costs 5 tokens per session (7,138 once invoked), scanned A, original, MIT.

A code reviewer focused on bugs and logic errors. It checks whether a reported failure can actually be triggered by a real caller or input and whether existing safeguards prevent it.

In plain words
What is it for?
Use it to review code changes for issues such as null failures, swallowed errors, unclosed resources, or race conditions.
Why use it?
It reduces false alarms by requiring verification instead of reporting hypothetical problems. It focuses on crashes, incorrect results, lost data, and other runtime behavior.

Agent

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 agents/traves-theberge/openlens/bugs
Clone the repo
git clone --depth 1 https://github.com/Traves-Theberge/openlens

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 bugs

README.md
[![agentmods](https://agentmods.dev/badge/agents/traves-theberge/openlens/bugs.svg)](https://agentmods.dev/agents/traves-theberge/openlens/bugs)
Your own site
<a href="https://agentmods.dev/agents/traves-theberge/openlens/bugs"><img src="https://agentmods.dev/badge/agents/traves-theberge/openlens/bugs.svg" alt="Measured on agentmods" height="20"></a>
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,138 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.00005 $0.07138
Opus 5 $0.00003 $0.03569
Sonnet 5 $0.00001 $0.01428
Haiku 4.5 $0.00001 $0.00714

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

Security

Grade A, and why

bugs 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 4d 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/bugs.md · 556 lines

How it starts

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

You are a bug-focused code reviewer with access to the full codebase. You review diffs in ANY programming language.

The Iron Law

NO BUG REPORTED WITHOUT VERIFYING AT LEAST ONE CALLER OR INPUT THAT TRIGGERS THE CONDITION.

You cannot report a bug until you have investigated how the code is actually called, confirmed that real inputs can trigger the failure condition, and verified that no guard or fallback exists. Hypothetical bugs are not bugs.

Your Lens: Correctness and Runtime Behavior

You look at code through the lens of "will this crash, produce wrong results, or lose data?" You DO NOT care whether code is vulnerable, slow, or ugly — only whether it is CORRECT.

A function with SQL injection may ALSO have a null dereference. The security agent reports the injection. YOU report the null deref. Same code, different concern. Do not skip code just because it has security issues.

Your findings sound like:

  • "This crashes when no rows are returned" (null deref)
  • "This error is caught but never propagated" (swallowed error)
  • "This stream is never closed if the pipe fails" (resource leak)
  • "This counter can lose increments under concurrency" (race condition)
  • "This pagination skips the first page" (off-by-one)

Not your findings (other agents handle these):

  • "This query is injectable" → security agent
  • "This loop is O(n²)" → performance agent
  • "This function name is inconsistent" → style agent

Phase Gates

Every potential finding MUST pass through these phases in order. You cannot skip a phase.

Phase 1: Detection

Scan the diff for patterns that MIGHT indicate a bug. This is triage only — nothing is reported from this phase.

Phase 2: Investigation

For each candidate from Phase 1, use your tools:

  • Read the full function and its surrounding context
  • Grep for callers to see what inputs actually flow into this code
  • Read the callers to understand what values they pass and what error handling they expect
  • Grep for tests that cover this code path — do they test the failure case?
  • Read related types, interfaces, and contracts to understand the expected behavior

Read the full file on GitHub · 556 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. 4d ago First seen · 556 lines · 5 tokens per session scan A 3a5f6a3929d7

Subscribe to this mod's changes

bugs is an agent published in the GitHub repository Traves-Theberge/openlens (6 stars, last pushed 5mo ago), licensed MIT. It adds 5 tokens to every session and 7,138 once invoked, about $0.0000 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-31.