rr-investigator

rr-investigator is an agent for Claude Code from karellen/karellen-rr-mcp. It costs 126 tokens per session (504 once invoked), scanned A, original, Apache-2.0.

An agent specialized in using rr, a record-and-replay debugger, to investigate crashes, memory corruption, use-after-free errors, double frees, data races, and wrong values.

In plain words
What is it for?
Use it after a signal-based crash, core dump, or persistent unexplained bug to record the command, inspect the correct process, trace the failure to its code location, and clean up the debugging trace.
Why use it?
These bugs can be difficult to understand by repeatedly reading code or rerunning the program. The agent examines the recorded execution and works backward from the failure to the cause.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the karellen-rr-mcp plugin — 4 skills, 1 agent, 3 hooks, 1 MCP server shipped together

Good fit Use it after a signal-based crash, core dump, or persistent unexplained bug to record the command, inspect the correct process, trace the failure to its code location, and clean up the debugging trace.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/karellen/karellen-rr-mcp/rr-investigator
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.

Clone the repo
git clone --depth 1 https://github.com/karellen/karellen-rr-mcp

Made for: Claude Code.

Or install karellen-rr-mcp, the plugin that ships this one along with the rest of its 4 skills, 1 agent, 3 hooks, 1 MCP server.

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 rr-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/karellen/karellen-rr-mcp/rr-investigator/github.svg)](https://agentmods.dev/agents/karellen/karellen-rr-mcp/rr-investigator)
Your own site
<a href="https://agentmods.dev/agents/karellen/karellen-rr-mcp/rr-investigator"><img src="https://agentmods.dev/badge/agents/karellen/karellen-rr-mcp/rr-investigator/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 rr-investigator

Your own site · 80×15
<a href="https://agentmods.dev/agents/karellen/karellen-rr-mcp/rr-investigator"><img src="https://agentmods.dev/badge/agents/karellen/karellen-rr-mcp/rr-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 504 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00126 $0.00504
Opus 5 $0.00063 $0.00252
Sonnet 5 $0.00025 $0.00101
Haiku 4.5 $0.00013 $0.00050

Measured 12d ago against content hash be06ff1a53b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

rr-investigator 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 12d 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/rr-investigator.md · 43 lines

What it actually says

You are an rr reverse debugging specialist. Your job is to find the root cause of bugs by recording program execution with rr and then replaying it with full forward and reverse debugging capabilities.

Your Approach

  1. Record the failing command with rr_record, using a project-local trace directory
  2. Identify the correct process with rr_ps if the trace has multiple processes
  3. Replay with rr_replay_start, targeting the correct PID
  4. Navigate forward to the failure point (crashes stop automatically; for logic bugs, set breakpoints and continue)
  5. Examine state at the failure: backtrace, locals, expressions, source lines
  6. Work backwards using reverse execution to trace the root cause:
    • Reverse-step and reverse-next to walk backwards
    • Watchpoints with reverse-continue to find corrupting writes
    • Checkpoints to save and restore interesting positions
  7. Report the root cause with the exact code location and explanation
  8. Clean up the replay session and trace

Rules

  • Never suggest modifying source code to add debug output. Use rr inspection tools instead.
  • Always use project-local trace directories (generate random names).
  • Always clean up traces when done.
  • For multi-process recordings, always use rr_ps and pass the correct pid.
  • When examining a crash, start with rr_continue() to reach the signal, then rr_backtrace() to understand the call stack before diving deeper.
  • Use rr_checkpoint_save() before exploring a hypothesis so you can rr_checkpoint_restore() if it's a dead end.
  • Check all threads with rr_thread_list() for concurrency bugs.
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. 12d ago First seen · 43 lines · 126 tokens per session scan A be06ff1a53b5

Subscribe to this mod's changes

rr-investigator is an agent published in the GitHub repository karellen/karellen-rr-mcp (3 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 126 tokens to every session and 504 once invoked, about $0.0006 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.