heterogeneous-agent

Align raw CLI agent traces with LobeHub adapter and persistence invariants.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kingheu0818-sketch/lobehub_yu --skill heterogeneous-agent-kingheu0818-sketch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: heterogeneous-agent
Source: https://github.com/kingheu0818-sketch/lobehub_yu/tree/main/.agents/skills/heterogeneous-agent
Command: npx skills add https://github.com/kingheu0818-sketch/lobehub_yu --skill heterogeneous-agent-kingheu0818-sketch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you diagnose and repair integration issues in LobeHub heterogeneous agent pipelines (e.g., Claude Code, Codex, and external CLI agents) when transport, adapter event mapping, persistence, or tool-call chaining breaks.

Core Features & Use Cases

  • Adapter and transport debugging: Validate raw CLI event traces against adapted HeterogeneousAgentEvent mappings to isolate whether failures occur before or after the adapter/executor layers.
  • Tool-call integrity fixes: Ensure one raw tool item maps to one stable ToolCallPayload.id, preserve step boundaries, and prevent orphan or stuck tool messages.
  • Persistence and session correctness: Verify persistToolBatch, persistToolResult, subagent thread scoping, and resume/session handling so tool_result resolves the correct tool row and subagent chunks don’t leak into the main stream.
  • Common failure patterns: Resolve mixed multi-tool messages, broken step boundaries, duplicate partial/full chunks, missing tool results, and broken subagent routing (including Claude Code and Codex-specific semantics).

Quick Start

Use this skill to reproduce the bug with a captured raw CLI trace, compare raw versus adapted events along the pipeline, then make the smallest fix in the adapter/transport or persistence layer that satisfies the stated tool and step invariants.

Frequently Asked Questions about heterogeneous-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix broken Claude Code or Codex adapter event mapping in LobeHub?

To fix adapter event mapping, compare raw CLI provider traces against adapted HeterogeneousAgentEvent mappings to isolate failures before or after the adapter executor layers. This ensures correct step boundary signaling and stable ToolCallPayload IDs.

Why does my tool-call chaining fail with orphan tool messages during subagent thread routing?

Tool-call chaining fails when one raw tool item does not map to one stable ToolCallPayload ID, causing orphan messages. Verify tool_result semantics and resolution via toolMsgIdByCallId to ensure subagent chunks do not leak into the main stream.

What is the best way to debug Electron IPC transport issues for heterogeneous agent flows?

Debugging Electron IPC transport requires validating critical invariants like stable tool-call IDs and correct step boundary signaling. Compare raw versus adapted events along the pipeline to make the smallest fix in the transport or persistence layer.

How do I resolve duplicate partial or full chunks in heterogeneous CLI-agent integrations?

Resolve duplicate chunks by validating adapter event mapping and ensuring correct persistToolBatch and persistToolResult behavior. This prevents mixed multi-tool messages and ensures tool_result resolves the correct tool row during session handling.

Can I use this approach to debug resume and session handling for Codex flows?

Yes, debugging resume and session handling applies to Codex flows by verifying subagent thread scoping and persistence correctness. Validate tool_result semantics and ensure subagent chunks remain scoped correctly without leaking into the main stream.

What are the limitations when debugging renderer trace hydration in heterogeneous agent pipelines?

Renderer trace hydration debugging requires validating critical invariants such as stable tool-call IDs and correct resolution via toolMsgIdByCallId before proceeding to later-stage UI or tracing. Failures in these invariants prevent successful downstream hydration.