ccc-debug-session

ccc-debug-session is a command for coding agents from KevinZai/commander. It costs 15 tokens per session (541 once invoked), scanned A, original, MIT.

A structured investigation process for finding the cause of a software problem by recording possible explanations, evidence, and targeted tests.

In plain words
What is it for?
Use it to investigate errors, unexpected behavior, recent changes, related files, past fixes, and the code history behind a problem.
Why use it?
It reduces guesswork by checking likely causes systematically before changing code.

Command

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 commands/kevinzai/commander/ccc-debug-session
Clone the repo
git clone --depth 1 https://github.com/KevinZai/commander

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 ccc-debug-session

README.md
[![agentmods](https://agentmods.dev/badge/commands/kevinzai/commander/ccc-debug-session.svg)](https://agentmods.dev/commands/kevinzai/commander/ccc-debug-session)
Your own site
<a href="https://agentmods.dev/commands/kevinzai/commander/ccc-debug-session"><img src="https://agentmods.dev/badge/commands/kevinzai/commander/ccc-debug-session.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 541 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.00015 $0.00541
Opus 5 $0.00008 $0.00270
Sonnet 5 $0.00003 $0.00108
Haiku 4.5 $0.00002 $0.00054

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

Security

Grade A, and why

ccc-debug-session 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.

commands/ccc-debug-session.md · 75 lines

What it actually says

Debug Session — Structured Investigation

Starting debug session for: {{input}}

Phase 1: Gather Context

  1. Recent changes: Run git log --oneline -10 and git diff HEAD~3 to see what changed recently
  2. Error reproduction: Identify the exact error message, stack trace, or unexpected behavior
  3. Related files: Search for files related to the issue description
  4. Previous fixes: Check tasks/lessons.md for related past fixes
  5. Git blame: Identify when the relevant code was last changed

Phase 2: Hypothesis Generation

Generate 3-5 candidate root causes, ranked by likelihood:

HYPOTHESIS 1 (most likely): [description]
  Evidence for: [what supports this]
  Evidence against: [what contradicts this]
  Test: [how to verify]

HYPOTHESIS 2: [description]
  Evidence for: ...
  Evidence against: ...
  Test: ...

Phase 3: Systematic Investigation

For each hypothesis (starting with most likely):

  1. Design a minimal test to confirm or eliminate
  2. Run the test
  3. Document the result
  4. If confirmed → proceed to fix. If eliminated → next hypothesis.

IMPORTANT: Do not change code to "try things." Test hypotheses with reads, greps, and targeted experiments first.

Phase 4: Resolution

When root cause is identified:

  1. Write a reproduction test FIRST (RED)
  2. Implement the minimal fix (GREEN)
  3. Verify the fix resolves the original issue
  4. Run full test suite to check for regressions
  5. Document in tasks/lessons.md:
## [Date] — {{input}}
**Root cause:** [what actually caused it]
**Fix:** [what was changed]
**Lesson:** [what to watch for in the future]
**Prevention:** [rule or test that prevents recurrence]

Output Format

DEBUG SESSION: {{input}}
Status: [INVESTIGATING / ROOT CAUSE FOUND / FIXED / UNRESOLVED]

Hypotheses tested: X/Y
Root cause: [description or "still investigating"]
Fix applied: [yes/no — description]
Tests added: [yes/no — count]
Lessons captured: [yes/no]
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 · 75 lines · 15 tokens per session scan A 0e77c4622dfd

Subscribe to this mod's changes

ccc-debug-session is a command published in the GitHub repository KevinZai/commander (6 stars, last pushed yesterday), licensed MIT. It adds 15 tokens to every session and 541 once invoked, about $0.0001 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.