What problem does it solve? Bugs in external CLI agent integrations (Claude Code, Codex) are hard to localize because failures can originate in raw CLI output, event adapters, persistence, or UI hydration. This Skill provides a structured pipeline map, debug order, and invariants to isolate and fix defects in the heterogeneous agent transport layer. ## Core Features & Use Cases - Layered Debug Workflow: Trace bugs from raw CLI stdout through adapters, the executor, persistence, and the gateway UI handler in a fixed order. - Trace Capture Guidance: Read recorded live session traces (meta.json, stdout.jsonl, stderr.log) from .heerogeneous-tracing/ instead of hand-rolling CLI reproductions. - Invariant Checklists: Enforce rules like one tool item mapping to one stable ToolCallPayload.id, message.id-based step boundaries, and subagent thread isolation. - Use Case: When Claude Code duplicates text or Codex collapses multiple tools into one assistant message, follow the debug order to compare raw JSONL against adapted events and add a focused 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.