cognitive-debugger — Claude Code subagent: how to install
cognitive-debugger — a diagnostic subagent for Claude Code that investigates reasoning breakdowns, traces error propagation across logic chains, and applies WFGY recovery protocols.
no license ★ 1,357 updated 2026-03-01
.claude/agents/cognitive-debugger.mdWhat cognitive-debugger does
This subagent acts as an investigator for broken model reasoning. It spots circular logic, invalid inferences, and context drift, mapping out how an initial mistake cascaded through subsequent arguments.
Under the hood, it operates via internal commands prefixed with an asterisk, such as *diagnose-failure, *trace-error, *rollback, and *step-debug. Tracing depth reaches 10 nodes, with up to 5 rollback checkpoints and 20 breakpoints. Failures trigger light, moderate, or severe recovery paths based on a calculated resonance threshold.
Advanced repair commands like *apply-bbcr expect dependency definitions inside .claude/commands/wfgy/ and .claude/commands/reasoning/, so missing files in those paths will stall recovery steps.
What it helps with
- pinpoint the root cause of an invalid deduction
- track how a false premise traveled across steps
- roll back the reasoning chain to the last good checkpoint
- reconstruct damaged conclusions using BBCR correction
Example prompts for the agent
- Run
*diagnose-failureon the previous answer to locate the invalid step - Use
*trace-errorto map where the premise collapsed - Execute
*step-debugto inspect the reasoning chain node by node
How to install cognitive-debugger
Manually: put the files in place
.claude/agents/cognitive-debugger.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/cognitive-debugger.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/cognitive-debugger.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about cognitive-debugger
How to install cognitive-debugger in Claude Code?
Save the subagent markdown configuration into your repository at .claude/agents/cognitive-debugger.md.
What does cognitive-debugger do?
It analyzes reasoning missteps, isolates root causes in broken logic, and rebuilds valid deductions using structured recovery sequences.
What external dependencies does the subagent require?
Core diagnostics work standalone, but repair operations depend on command files stored under .claude/commands/wfgy/ and .claude/commands/reasoning/.