acp-router

Routes plain-language requests to ACP harness sessions for Pi, Claude Code, Codex, OpenCode, or Gemini CLI.

1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/Cyandex/ErnOS --skill acp-router-cyandex
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: acp-router
Source: https://github.com/Cyandex/ErnOS/tree/main/extensions/acpx/skills/acp-router
Command: npx skills add https://github.com/Cyandex/ErnOS --skill acp-router-cyandex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires acpx.

What problem does it solve? It removes the guesswork of deciding how to run work in external coding harnesses like Pi, Claude Code, Codex, OpenCode, or Gemini CLI by automatically routing requests to the correct ACP runtime session or direct acpx CLI flow. ## Core Features & Use Cases - Intent Detection and Routing: Recognizes when a user wants work run in an external coding harness and selects between the ErnOS ACP runtime path and the direct acpx telephone-game path. - Agent ID Mapping: Maps natural harness names like "claude" or "codex" to the correct ACP agentId aliases used by acpx. - Session Management and Recovery: Maintains persistent named sessions per conversation, handles NO_SESSION and queue-busy errors, and performs automatic repair of the pinned plugin-local acpx binary before falling back. - Use Case: A user says "start a codex thread and tell it to refactor the auth module" and the skill spawns an ACP thread session with the correct agentId, or drives acpx directly if the runtime is unavailable. ## Quick Start Ask ErnOS to spawn a Codex session in a thread and tell it to say hi.

Frequently Asked Questions about acp-router

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

FAQPage Schema
How do I run a task in Claude Code or Codex from ErnOS?▼

State the harness name and task in plain language, and the router spawns an ACP runtime session with the matching agentId such as "claude" or "codex". If the ACP runtime is unavailable, it falls back to driving the harness directly through the acpx CLI.

What is the difference between the ACP runtime path and the direct acpx path?▼

The ACP runtime path uses sessions_spawn with runtime "acp" and thread mode for managed lifecycle sessions. The direct acpx path executes the pinned acpx binary via exec to relay prompts to the harness, used when the runtime is unhealthy or only simple prompt relay is needed.

Which coding harnesses does acpx support?▼

acpx has built-in aliases for pi, claude, codex, opencode, and gemini, each mapped to a default adapter command such as npx @zed-industries/codex-acp. Overrides in ~/.acpx/config.json replace these defaults.

Why does my ACP thread spawn fail and how is it recovered?▼

Failures usually come from a missing or mismatched acpx binary or broken adapter overrides. The skill reinstalls the pinned plugin-local acpx in extensions/acpx, restarts the gateway, and retries once before offering fallback options.

Can I keep a persistent conversation with an external harness?▼

Yes, sessions use a deterministic name like oc-codex-<conversationId> so follow-up prompts reuse the same harness context. You can also cancel in-flight turns or close the session with acpx commands.