OC-MACP: OpenClaw MACP plugin — sessions_spawn runtime:macp with Pi dispatch and completion signaling #328
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Build an OpenClaw extension that makes MACP the primary agent execution runtime in OC, as a near drop-in replacement for ACP.
Requirements
1. OC MACP Extension (
openclaw/extensions/macp/)IAgentProviderinterface:listSessions | streamSession | sendMessage | terminate | getSessionTreesessions_spawn(runtime: "macp"), route to this extensionmacp_dispatcher.dispatch_task()→ Pi runner → model → resultagents.providers.macpwithdispatch: pi,model: zai/glm-52. Completion Signaling (push, not poll)
openclaw system event --text "MACP_COMPLETE: <task_id> <result_path>"on finishsessions_spawnpromise3. MACP as ACP near drop-in
sessions_spawnacceptsruntime: "macp"alongside existingruntime: "acp"agents.defaultRuntime: "macp" | "acp"4. Pi Runner as persistent service
POST /dispatchArchitecture
Reference
~/src/mosaic-mono-v1/tools/macp/dispatcher/macp_dispatcher.py~/src/mosaic-mono-v1/tools/macp/dispatcher/pi_runner.ts~/src/mosaic-mono-v1/docs/discovery/MACP-discovery-map.mdWhy this matters
Without this, every automated task requires manual shell script orchestration, worktree management, and polling. With this,
sessions_spawn(runtime: "macp", task: "...")handles everything — execution, tracking, completion signaling — and Jarvis gets real autonomous capability.Priority
CRITICAL — blocks all automated E2E agent orchestration
Labels
macp, openclaw-integration, automation, P0
Validation findings (2026-03-30)
Plugin compiled and registered. Blocked on acpx dispatch integration:
What works:
dist/index.js✅registerAcpRuntimeBackendcalled on plugin init ✅macpadded toacp.allowedAgents✅Blocker:
sessions_spawn(runtime:acp, agentId:macp)→acpx exited with code 1registerAcpRuntimeBackendhook is in OC core, not in acpxFix needed:
Assigning back to Forge for fix.