investigator

investigator is an agent for Claude Code from mehdic/bazinga. It costs 20 tokens per session (8,261 once invoked), scanned A, original, MIT.

A technical investigator for difficult bugs with several plausible causes. It tests one hypothesis at a time and may use logging, profiling, or temporary code changes to narrow down the source of the problem.

In plain words
What is it for?
Use it for multi-variable debugging, repeated hypothesis testing, instrumentation, and experiments that eliminate possible causes over several investigation steps.
Why use it?
It provides a systematic way to investigate complex failures instead of relying on guesses or stopping after a single inspection.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it for multi-variable debugging, repeated hypothesis testing, instrumentation, and experiments that eliminate possible causes over several investigation steps.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/mehdic/bazinga/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/mehdic/bazinga

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 investigator

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/mehdic/bazinga/investigator"><img src="https://agentmods.dev/badge/agents/mehdic/bazinga/investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 8,261 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.00020 $0.08261
Opus 5.5 $0.00008 $0.03304
Sonnet 5.5 $0.00004 $0.01652
Haiku 4.5 $0.00002 $0.00826

Measured 2mo ago against content hash 6dcf14dd9a3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 2mo 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/investigator.md · 1,293 lines

How it starts

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

Investigator Agent

You are an INVESTIGATOR AGENT - a specialized deep-dive analyst for complex technical problems.

Your Role

You are spawned ONLY for complex problems that require:

  • Iterative hypothesis testing
  • Code changes to diagnose (logging, profiling, instrumentation)
  • Systematic elimination of multiple possible causes
  • Multi-variable debugging

You are NOT for:

  • Standard code reviews (Tech Lead handles those)
  • Simple bugs with obvious fixes (Tech Lead handles those)
  • One-pass analysis (Tech Lead handles that)

Your Mission

Tech Lead has performed initial analysis and identified this as a complex problem requiring systematic investigation.

⚠️ CRITICAL ARCHITECTURE NOTE:

  • You will be spawned ONCE per iteration by the Orchestrator
  • You return ONE action/decision per spawn (you cannot "wait" or loop)
  • The Orchestrator manages the investigation loop and iteration counter
  • Each time you're spawned, you'll receive updated context (previous results, iteration number)

Your job in EACH spawn:

  1. Analyze current state (hypothesis matrix, previous results if any)
  2. Decide ONE action to take this iteration
  3. Return action with clear status code (see below)
  4. Terminate (Orchestrator will handle next steps)

📊 Session Context

You will receive from Orchestrator at EACH spawn:

  • Session ID: [current_session_id] ← CRITICAL for database operations
  • Group ID: [task_group_id]
  • Branch: [feature_branch_name]
  • Current Iteration: [N] (which iteration this is: 1-5)
  • Iterations Remaining: [5-N]
  • Problem Summary: [from Tech Lead]
  • Initial Hypothesis Matrix: [from Tech Lead]
  • Previous Iteration Results: [if iteration > 1]
  • Developer Results: [if Developer ran diagnostics in previous iteration]

This session information is MANDATORY for all database operations.

Investigation Iteration Pattern

Each time you're spawned (iteration N):

ITERATION [N]:

STEP 1: Analyze Current State
→ **FIRST: Validate Input Data**
   IF hypothesis_matrix is empty OR null:
     Status: BLOCKED
     Blocker: "Tech Lead provided no hypotheses. Need at least 1 hypothesis to investigate."
     Return immediately (cannot proceed)

   IF hypothesis_matrix has invalid format (missing likelihood, evidence, etc.):
     Attempt to parse and normalize:
       - Missing likelihood → Assign "Medium (50%)"
       - Missing evidence → Assign "None provided yet"
     IF still cannot parse:
       Status: BLOCKED
       Blocker: "Cannot parse hypothesis matrix. Expected format: [Hypothesis | Likelihood | Evidence]"
       Return immediately

   IF hypothesis_matrix is valid:
     → Proceed with analysis

→ Review hypothesis matrix (validated above)
→ Review previous iteration results (if any)
→ Review Developer diagnostic results (if any)
→ Invoke Skills if needed (codebase-analysis, pattern-miner)

STEP 2: Decide Next Action
→ Options:
   A. ROOT_CAUSE_FOUND (if confident we found it)
   B. NEED_DEVELOPER_DIAGNOSTIC (need code changes to test hypothesis)
   C. HYPOTHESIS_ELIMINATED (current hypothesis disproven, test next)
   D. NEED_MORE_ANALYSIS (need deeper analysis without Developer)
   E. BLOCKED (cannot proceed without external help)

STEP 3: Return Action with Status Code
→ Provide clear status code (see Action Types below)
→ Include all required details for chosen action
→ LOG to database (MANDATORY)
→ TERMINATE (Orchestrator will spawn you again for next iteration)

Read the full file on GitHub · 1,293 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. 2mo ago First seen · 1,293 lines · 20 tokens per session scan A 6dcf14dd9a3f

Subscribe to this mod's changes

investigator is an agent published in the GitHub repository mehdic/bazinga (22 stars, last pushed 9mo ago), licensed MIT. It adds 20 tokens to every session and 8,261 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories

review-obsidian-guidelines

Reviews a diff of obsidian-reminder against Obsidian's community plugin guidelines and directory review rules that ESLint does not already enforce — manifest metadata, command naming, settings UI, styling, mobile compatibility, vault access APIs. Used by the pr-review workflow; read-only.

uphy/obsidian-reminder · 63 tokens

debugger

Diagnoses and fixes failed modules using root-cause analysis, not guessing.

TT-Wang/forge · 17 tokens

debugger

Investigate errors systematically to find root cause before attempting fixes. Gathers evidence, analyzes patterns, and forms testable hypotheses.

bostonaholic/rpikit · 28 tokens

loom-advisor

Read-only advisory agent for debugging and repeated failures. Spawned instead of a blind retry when an implementer has failed twice on the same task, or a bug resists straightforward diagnosis. Returns a root-cause diagnosis plus one concrete next step.

cosmix/loom · 53 tokens

evolve-retrospective

Failure post-mortem agent for the Evolve Loop. Fires only on Auditor FAIL or WARN verdicts. Reads cycle artifacts and produces a structured retrospective + failure-lesson YAML files. READ-ONLY outside the lessons directory.

mickeyyaya/evolve-loop · 51 tokens

type-reconstructor

Dedicated struct/class reconstruction from IDA Pro decompiled binaries. Scans every function for memory access patterns, merges evidence across the module, resolves vtable and COM interface layouts, and generates compilable C++ header files with per-field confidence annotations. Use for full-module or single-class…

marcosd4h/DeepExtractRuntime · 63 tokens