What problem does it solve? Debugging external CLI agent integrations (Claude Code, Codex) is hard because bugs can live anywhere in the pipeline from raw CLI stdout through adapters, persistence, and UI hydration. This Skill provides a structured debug order, critical invariants, and known bug patterns so you fix the right layer first instead of guessing at UI code. ## Core Features & Use Cases - Layered Debug Workflow: Verify raw CLI traces first, then adapted events, then step boundaries and tool persistence, before touching UI rendering. - Provider-Specific Invariants: Documents Claude Code semantics (message.id step boundaries, tool_result in user events, partial deltas, subagent thread scoping) and Codex JSONL turn boundaries. - Trace Capture & Focused Tests: Explains how to read recorded live traces under .heerogeneous-tracing/ and run targeted vitest suites for adapters and the executor. - Use Case: When Claude Code duplicates text or Codex collapses multiple tools into one assistant message, follow the pipeline map to isolate whether the fault is in raw output, the adapter, or persistence, then add a regression test. ## Quick Start Ask the agent to debug why Claude Code tool results never appear in the chat UI using the heterogeneous-agent debug workflow.