Route plain-language requests for Pi, Claude Code, Codex, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation.
When user intent is "run this in Pi/Claude Code/Codex/Cursor/Copilot/OpenClaw/OpenCode/Gemini/Qwen/Kiro/Kimi/iFlow/Droid/Kilocode (ACP harness)", do not use subagent runtime or PTY scraping. Route through ACP-aware flows.
Trigger this skill when the user asks OpenClaw to:
Mandatory preflight for coding-agent thread requests:
OpenClaw ACP runtime path below; do not use message(action="thread-create") for ACP harness thread spawn.Choose one of these paths:
sessions_spawn / ACP runtime tools.acpx path (telephone game): use acpx CLI through exec to drive the harness session directly.Use direct acpx when one of these is true:
acpx drivingDo not use:
subagents runtime for harness control/acp command delegation as a requirement for the useracpx is availableUse these defaults when user names a harness directly:
agentId: "pi"agentId: "openclaw"agentId: "claude"agentId: "codex"agentId: "copilot"agentId: "cursor"agentId: "droid"agentId: "opencode"agentId: "gemini"agentId: "iflow"agentId: "kilocode"agentId: "kimi"agentId: "kiro"agentId: "qwen"These defaults match current acpx built-in aliases.
If policy rejects the chosen id, report the policy error clearly and ask for the allowed ACP agent id.
Required behavior:
sessions_spawn with:
runtime: "acp"thread: truemode: "session" (unless user explicitly wants one-shot)message with action=thread-create; sessions_spawn is the only thread-create path.task so the ACP session gets it immediately.agentId explicitly unless ACP default agent is known.Example:
User: "spawn a test codex session in thread and tell it to say hi"
Call:
{
"task": "Say hi.",
"runtime": "acp",
"agentId": "codex",
"thread": true,
"mode": "session"
}
When the user asks to start a coding harness in a thread, treat that as an ACP runtime request and try to satisfy it end-to-end.
Required behavior when ACP backend is unavailable:
${ACPX_CMD} --versionWhen offering fallback, keep ACP first:
Do not default to subagent runtime for these requests.
For this repo, direct acpx calls must follow the same pinned policy as the @openclaw/acpx extension package.
${ACPX_PLUGIN_ROOT}/node_modules/.bin/acpxnode -e "console.log(require(process.env.ACPX_PLUGIN_ROOT + '/package.json').dependencies.acpx)"cd "$ACPX_PLUGIN_ROOT" && npm install --omit=dev --no-save acpx@<pinnedVersion>${ACPX_PLUGIN_ROOT}/node_modules/.bin/acpx --versionnpm install -g acpx unless the user explicitly asks for global install.Set and reuse:
ACPX_PLUGIN_ROOT="<bundled-acpx-plugin-root>"
ACPX_CMD="$ACPX_PLUGIN_ROOT/node_modules/.bin/acpx"
Use this path to drive harness sessions without /acp or subagent runtime.
exec commands that call ${ACPX_CMD}.--format quiet for clean assistant text to relay back to user.exec (one-shot) only when the user wants one-shot behavior.--cwd) when task scope depends on repo context.Use a deterministic name, for example:
oc-<harness>-<conversationId>Where conversationId is thread id when available, otherwise channel/conversation id.
Persistent session (create if missing, then prompt):
${ACPX_CMD} codex sessions show oc-codex-<conversationId> \
|| ${ACPX_CMD} codex sessions new --name oc-codex-<conversationId>
${ACPX_CMD} codex -s oc-codex-<conversationId> --cwd <workspacePath> --format quiet "<prompt>"
One-shot:
${ACPX_CMD} codex exec --cwd <workspacePath> --format quiet "<prompt>"
Cancel in-flight turn:
${ACPX_CMD} codex cancel -s oc-codex-<conversationId>
Close session:
${ACPX_CMD} codex sessions close oc-codex-<conversationId>
claudecodexcopilotcursordroidgeminiiflowkilocodekimikiroopenclawopencodepiqwenDefaults are:
openclaw -> openclaw acpclaude -> npx -y @zed-industries/[email protected]codex -> npx @zed-industries/codex-acp@^0.9.5copilot -> copilot --acp --stdiocursor -> cursor-agent acpdroid -> droid exec --output-format acpgemini -> gemini --acpiflow -> iflow --experimental-acpkilocode -> npx -y @kilocode/cli acpkimi -> kimi acpkiro -> kiro-cli acpopencode -> npx -y opencode-ai acppi -> npx pi-acp@^0.0.22qwen -> qwen --acpIf ~/.acpx/config.json overrides agents, those overrides replace defaults.
If your local Cursor install still exposes ACP as agent acp, set that as the cursor agent override explicitly.
acpx: command not found:
acpx unless explicitly requestedclaude-agent-acp not found):
~/.acpx/config.json agent overridesNO_SESSION: run ${ACPX_CMD} <agent> sessions new --name <sessionName> then retry prompt.--no-wait when async behavior is explicitly desired.When relaying to user, return the final assistant text output from acpx command result. Avoid relaying raw local tool noise unless user asked for verbose logs.