ccc-debug-session

ccc-debug-session is a command for Claude Code from KevinZai/commander. It costs 42 tokens per session (889 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 for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool; mentions Codex.

Good fit Use it to investigate errors, unexpected behavior, recent changes, related files, past fixes, and the code history behind a problem.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kevinzai/commander/ccc-debug-session
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/KevinZai/commander

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/kevinzai/commander/ccc-debug-session/github.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/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 ccc-debug-session

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 889 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.00042 $0.00889
Opus 5.5 $0.00017 $0.00356
Sonnet 5.5 $0.00008 $0.00178
Haiku 4.5 $0.00004 $0.00089

Measured 6d ago against content hash be2c3d8e2219, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 6d 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.

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

How it starts

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

/ccc-debug-session — hypothesis-driven bug hunt

CC Commander · /ccc-debug-session · root cause first, then a tested fix and a recorded lesson.

Issue: $ARGUMENTS. If it is empty, ask the user for the error message or the unexpected behavior before starting.

Phase 1: Gather context

  1. Recent changes:

    git log --oneline -10
    git diff HEAD~3
    

    If HEAD~3 does not exist, use git diff against the first commit.

  2. Reproduce: capture the exact error message, stack trace or wrong output, and the command that produces it.

  3. Find related files with Grep/Glob on the symbols, messages and paths in the error.

  4. Read tasks/lessons.md (if present) for related past fixes.

  5. git blame -L <start>,<end> <file> on the suspect lines to see when they last changed.

Phase 2: Hypotheses

List 3 to 5 candidate root causes, most likely first:

HYPOTHESIS 1 (most likely): <description>
  Evidence for:     <what supports it>
  Evidence against: <what contradicts it>
  Test:             <the read, grep or experiment that confirms or eliminates it>

Phase 3: Investigate

For each hypothesis, starting with the most likely:

  1. Design the smallest test that confirms or eliminates it.
  2. Run it and record the result.
  3. Confirmed: go to Phase 4. Eliminated: next hypothesis.

Test hypotheses with reads, greps, logs and targeted experiments. Do not edit code to try things. If every hypothesis is eliminated, gather more evidence and write a new set before touching code.

When the root cause is confirmed, ask with AskUserQuestion (Codex: a plain-text question):

  • 🟢 Fix it now — write a failing test, then the minimal fix
  • Report only — stop with the root cause and the proposed fix
  • Investigate further — test the remaining hypotheses first

Phase 4: Resolve

  1. Write a reproduction test first and run it; it must fail for the reason found (red).
  2. Implement the minimal fix and rerun the test; it must pass (green).
  3. Rerun the original reproduction from Phase 1 and confirm the symptom is gone.
  4. Run the project's full test command (from package.json, Makefile, pyproject.toml or the project CLAUDE.md, for example npm test, pytest, go test ./...). Report the actual pass/fail line.
  5. Append to tasks/lessons.md:

Read the full file on GitHub · 95 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. 6d ago Changed · +20 lines · +27 tokens per session be2c3d8e2219
  2. 1mo ago 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 today), licensed MIT. It adds 42 tokens to every session and 889 once invoked, about $0.0002 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-09-03.