Skip to main content
subagent CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/cognitive-debugger.md
Open on GitHub

What 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-failure on the previous answer to locate the invalid step
  • Use *trace-error to map where the premise collapsed
  • Execute *step-debug to inspect the reasoning chain node by node

How to install cognitive-debugger

Manually: put the files in place

.claude/agents/cognitive-debugger.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

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/.

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set112

The whole set →
reasoning-validator The reasoning-validator subagent for Claude Code checks reasoning chains with WFGY formulas and quantitative metrics, helping identify logical errors in assistant reasoning. CX Codex ★ 1,357repo stars strategic-analyst strategic-analyst simulates business and architecture scenarios, maps project constraints, and logs planned initiatives directly into Linear. CX Codex ★ 1,357repo stars svelte-testing The svelte-testing subagent helps test Svelte and SvelteKit apps, from component behavior to end-to-end flows. Use it when you need coverage for UI interactions or server-side functions. CX Codex ★ 1,357repo stars logic-synthesizer logic-synthesizer splits a hard problem into several parallel solution paths, weighs each one and merges the strongest parts into a single answer. CX Codex ★ 1,357repo stars test-automator test-automator is a Claude Code subagent that plans automated tests and connects them to CI/CD. It activates for coverage work or when a project needs a testing setup from scratch. CX Codex ★ 1,357repo stars knowledge-mapper knowledge-mapper turns a subject into a map of concepts: nodes, typed links, clusters and routes between ideas. Handy when a topic is too big to keep in your head at once. CX Codex ★ 1,357repo stars full-stack-developer full-stack-developer — a subagent for full-cycle web engineering that crafts interfaces, builds server logic, and connects databases. Useful when delivering end-to-end features across the entire stack. CX Codex ★ 1,357repo stars handoff-continue handoff-continue writes a handoff document about the current work and starts a fresh Claude session in a Zellij pane with that document as its input. CX Codex +1 ★ 1,357repo stars

Project sponsors

Companies that keep this analytics open