acp-transcript-sync for Openclaw

An automated sync utility that writes Agent Communication Protocol (ACP) sub-session transcripts back to the parent session to preserve complete agent reasoning paths.

steflerjiang
v1.0.0
Jun 4, 2026
0
534
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install acp-transcript-sync

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install acp-transcript-sync using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is acp-transcript-sync?

ACP Transcript Sync is a critical utility designed for developers building multi-agent systems. When orchestrating hierarchical agent layouts where a parent agent spawns specialized ACP child agents (like cfuse, Claude Code, or Codex) to execute isolated tasks, their execution details and reasoning steps are typically trapped in isolated child session transcripts. This skill bridges that gap by automatically parsing finished child transcripts and appending them back into the main session's logs.

By leveraging this tool, you can maintain a unified source of truth for your agent interactions. This is especially vital for auditing, tracking, and debugging workflows within platform integrations like AIMA, which rely on single-stream main transcripts to analyze complete reasoning chains. Integrate this with other Openclaw Skills to achieve flawless multi-agent observability and robust debugging pipelines.

acp-transcript-sync Use Cases

  • Parent-Child Agent Orchestration: After spawning an ACP child agent to run code compilation or file manipulation, you need to consolidate its complete technical logs and execution trail back into the main workflow transcript.
  • Observability & Analytics Platforms (e.g., AIMA): When third-party platform collectors scan parent logs for session evaluations, keeping all child reasoning cycles synchronized directly in the main stream is critical for accurate monitoring.
  • Unified Session Audit Trails: Consolidating multiple child agent conversations (such as Claude Code or Gemini CLI) into a single master JSONL session file to preserve a sequential, end-to-end debugging trace.

How acp-transcript-sync Works

  1. Spawn ACP Session: The parent agent invokes sessions_spawn with runtime set to "acp" to execute a dedicated sub-task, noting down the newly created session_id and childSessionKey.
  2. Completion Notification: Once the sub-agent completes its objective, Openclaw broadcasts a completion event containing the final session_id and execution status.
  3. Execute Transcript Merging: The sync python script is triggered using the child's session ID and agent type. It automatically identifies the parent session (or uses the provided parent UUID) and reads both files.
  4. Prefix and Format Alignment: The script formats and tags the incoming child transcript entries with structured headers (e.g., [cfuse reasoning process]) and appends them to the main stream.
  5. Validation: The developer or automated flow checks the tail of the main JSONL session file using custom verification scripts to verify successful data ingestion, ensuring downstream tools can process the unified stream.

acp-transcript-sync Setup

To start using this capability within your Openclaw Skills workflow, follow these integration steps:

1. Locate the Script

Ensure you have the sync script available in your environment, typically located under:

<skill-dir>/scripts/sync-acp-to-main.py

2. Manual Command Execution

Run the sync tool directly using python, providing the mandatory sub-session details:

python3 scripts/sync-acp-to-main.py <acp_session_id> <acp_agent> [<main_session_id>] [<main_agent>]

Examples:

Explicitly defining both parent and child profiles:

python3 scripts/sync-acp-to-main.py f935963c-b8dd-431c-9d85-85e0e5a41341 cfuse 44c3f987-f9ad-4a02-b107-768ae9f517d3

Auto-detecting the active main session and parent agent:

python3 scripts/sync-acp-to-main.py f935963c-b8dd-431c-9d85-85e0e5a41341 cfuse

3. Verify the Synchronization

To manually confirm that transcripts have been successfully synchronized to the parent session, you can parse the tail end of the parent's session JSONL log:

tail -5 ~/.openclaw/agents/<main_agent>/sessions/<main_session_id>.jsonl | python3 -c "
import sys, json
for line in sys.stdin:
    d = json.loads(line)
    if d.get('type') == 'message':
        msg = d.get('message', {})
        content = msg.get('content', [])
        text = ''.join(c.get('text','') for c in content if c.get('type')=='text')
        print(f\"[{msg.get('role')}] {text[:100]}\")
"

acp-transcript-sync Data Schema & Taxonomy

Script Parameters

Parameter Required Description
acp_session_id Yes The unique UUID of the ACP child session (retrieved via completion webhook or sessions list)
acp_agent Yes The identifier of the sub-agent runtime (e.g., cfuse, claude, codex)
main_session_id No Parent agent session UUID. If omitted, automatically resolves to the latest parent session
main_agent No Parent agent identifier. If omitted, automatically detected

Transcript Merging & Formatting

To ensure distinct source tracking, merged entries are tagged with clear reasoning indicators based on the executing agent:

  • [cfuse reasoning process] - Standard log entry for the cfuse runtime.
  • [cfuse reasoning process] user - User-submitted prompt in the child session.
  • [cfuse reasoning process] assistant - Model reasoning and outputs from the child agent.

acp-transcript-sync Advanced Features

  • Fully Automated Workflow Integration: Chain the sync execution directly into your agent pipeline. Listen to the session_completed callback events, extract the target identifiers, and call the sync utility via system executions to enable real-time transcript synchronization.
  • Dynamic Parent Resolution: Avoids rigid hardcoding. The script can dynamically inspect local workspace logs to resolve the active parent runtime if session IDs are omitted.
  • Observability Verification: Includes embedded parsing utilities that utilize jq and tail syntax to quickly inspect active JSONL buffers without breaking agent operations.
  • Multi-Agent Runtime Support: Native support for various execution environments including Claude Code, Codex, and Custom Openclaw Skills agent setups.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*