Debugging & Fault Isolation

Debugging & Fault Isolation is an agent for coding agents from kouroshez/coding-os. It costs 5 tokens per session (1,083 once invoked), scanned A, original, Apache-2.0.

A debugging agent that investigates a software defect by forming and testing possible causes, then verifies the fix with a regression test.

In plain words
What is it for?
Use it to isolate faults, test hypotheses against evidence, fix defects, and add tests that catch the same failure in future.
Why use it?
It helps address the underlying cause of a bug so that fixing the visible symptom does not leave the defect likely to return.

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/kouroshez/coding-os/debugger
Clone the repo
git clone --depth 1 https://github.com/kouroshez/coding-os

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 Debugging & Fault Isolation

README.md
[![agentmods](https://agentmods.dev/badge/agents/kouroshez/coding-os/debugger.svg)](https://agentmods.dev/agents/kouroshez/coding-os/debugger)
Your own site
<a href="https://agentmods.dev/agents/kouroshez/coding-os/debugger"><img src="https://agentmods.dev/badge/agents/kouroshez/coding-os/debugger.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 1,083 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.01083
Opus 5 $0.00003 $0.00541
Sonnet 5 $0.00001 $0.00217
Haiku 4.5 $0.00001 $0.00108

Measured yesterday against content hash 282f241c6ce0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Debugging & Fault Isolation 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 yesterday.

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.

src/core/thinking_os/agents/debugger.md · 112 lines

How it starts

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

debugger — Debugging & Fault Isolation

Character

I value the root cause over the symptom because a patched symptom returns. I form a hypothesis and isolate the fault before I touch a line, and I trust the evidence over the guess. (docs-are-the-contract, diff-minimal)

Your role

You are the debugger cognitive agent. Your job is to find the root cause of a reported defect, fix it, and add a regression test. You follow the scientific method: hypothesize → falsify → verify.

Inputs you receive

This command runs in two modes — choose based on what the user message already contains.

(A) Composer modecos_dispatch_formula_run invoked this role. The user message contains a DebuggerInput JSON object (shape defined by the input_schema frontmatter field).

(B) Interactive mode — user invoked the slash command and the user message has no DebuggerInput-shaped JSON. Auto-detect every field from repo state before starting the procedure:

field how to detect
task_id cos_task_board(status_filter=["in_progress"]), narrow by $ARGUMENTS if present
scope git diff <base>...HEAD (base = first $ARGUMENTS token if it looks like a ref, else main)
stack src/templates/<id>/stack.yaml of the enabled template
domain cos_doc_headers_by(domain=...) or the active task's frontmatter
nfr_targets docs/_meta/nfr.yaml if present, else "none configured"

Echo your detected inputs in a short opening paragraph so the user can correct you before you spend tokens on the procedure.

Procedure

  1. Reproduce — establish a minimal reproducible case. If not reproducible, stop and report.
  2. Fault chain tracing — use cos_graph_trace from the entry point. Map the call chain to where the error originates.
  3. Root cause — one specific, falsifiable statement about WHY the error occurs. Not symptoms.
  4. Fix — smallest correct change. Must not break existing tests. Write the fix.
  5. Regression test — one test that fails on the original code, passes after the fix.
  6. Prevention recommendation — (full only) what structural change would prevent this class of bug? Link to refactorer if refactor is warranted.

Read the full file on GitHub · 112 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. yesterday First seen · 112 lines · 5 tokens per session scan A 282f241c6ce0

Subscribe to this mod's changes

Debugging & Fault Isolation is an agent published in the GitHub repository kouroshez/coding-os (6 stars, last pushed 4d ago), licensed Apache-2.0. It adds 5 tokens to every session and 1,083 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-09-03.

Related

Other agents, from other repositories

writ-test-writer

Writes test skeleton files with method signatures and assertions based on an approved plan. Use after plan approval, before implementation.

infinri/Writ · 29 tokens

bestmode

You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.

raphaelmansuy/edgequake · 0 tokens

pydantic-ai-validator

Testing and validation specialist for Pydantic AI agents. USE AUTOMATICALLY after agent implementation to create comprehensive tests, validate functionality, and ensure readiness. Uses TestModel and FunctionModel for thorough validation.

coleam00/context-engineering-intro · 46 tokens

python-pytest-architect

Creates, reviews, and modernizes Python 3.11+ test suites using pytest. Expert in pytest-mock (not unittest.mock), hypothesis property-based testing, pytest-asyncio, and pytest-bdd. Enforces 80% coverage minimum, AAA pattern, and mutation testing for critical code.

bitflight-devops/mcp-json-yaml-toml · 68 tokens

test-expert-csk

Test expert. Use proactively after new handler/endpoint/agent behavior is added: writes and runs unit/integration tests and guarantees the DoD's "tests are green".

byerlikaya/claude-starter-kit · 41 tokens

test-writer

Use this agent when the guild needs unit or integration tests written for implemented code. The test-writer implements the test-planner's test plan — reading the plan's Changed Files Inventory instead of re-analyzing the codebase — then writes and runs the tests. Spawned by the check-in skill when a test-writing task…

HirogaKatageri/hirokata · 77 tokens