Repository navigation
Description
Report
xmd plan in 0.10.0 fails with both providers, on a machine where codex 0.150.1 and claude 2.1.251 are installed and authenticated:
$ xmd plan "ask me for my name and then write it out"
agent "codex" is unavailable [ACP_BACKEND_UNAVAILABLE]: embedded ACP runtime probe failed (agent=codex; command=npx -y @agentclientprotocol/codex-acp@^0.0.44; cwd=/Users/…/.xmd/plan/sessions/e7cb…; Codex process has exited with code 1)
$ xmd plan "ask me for my name and then write it out" --default-agent=claude
this session still awaits first-turn materialization: the turn ended before the backend accepted it
Cause
xmd plan never installs the embedded ACP adapters, so its provider resolves agents through ACPX's stock registry.
The workflow path overlays them: packages/cli/src/workflow-agent.ts:427 passes agentRegistry: overlaidAdapterRegistry(adapters). The plan path does not: authorshipCeiling() in packages/cli/src/authorship-profile.ts builds the provider from hostAcpDependencies() and profile.acp, neither of which sets agentRegistry, so packages/acp/src/provider.ts falls back to createAgentRegistry() — ACPX's own table, pinned at codex: "^0.0.44" and claude: "^0.37.0" (packages/acp/vendor/acpx/generated/live-checkpoint-*.js, ACP_ADAPTER_PACKAGE_RANGES).
That produces both symptoms:
- codex — the probe spawns
[email protected], which ignores the installedcodexand runs its own bundled@openai/[email protected]throughnode bin/codex.js app-server. Reproduced outside xmd: that adapter answersinitializewithCodex process has exited with code 1; the underlying error isspawn …/@openai/codex-darwin-arm64/vendor/aarch64-apple-darwin/codex/codex ENOENT(the platform binary is absent from the npx cache). The same adapter initializes correctly withCODEX_PATH=$(which codex), so the installed codex is healthy — the failure belongs to the stale pin. - claude — the probe passes, the turn runs, but a stock
claude-agent-acpnever publishes theexecutablemd.session-materialization/v1signal (only the patched 0.70.0 inpackages/acp/vendor/adaptersdoes, per itsPROVENANCE.md), sofinalizeRuntimeTurnrejects with the materialization refusal (packages/acp/vendor/acpx/generated/runtime.js, "the turn ended before the backend accepted it").
installRunAgentStack (packages/cli/src/agent-stack.ts, used by xmd run in cli.ts) is built the same way as the plan path and is likely affected too; not reproduced.
Acceptance
xmd plan "<request>"andxmd plan … --default-agent=claudecomplete a first turn against the embedded adapters in a release build, with nonpxresolution of a stock adapter.- The plan provider resolves
codexandclaudethrough the same overlaid registry the workflow path uses, and an embedded provider never falls through to ACPX's pins. installRunAgentStackis checked for the same gap and fixed with it if present.- A test pins the registry the plan path hands its provider, so a stock pin cannot return silently.
Activity
🐛 Run and plan through this build's own ACP adapters (#672) (#673)
🐛 Prepare the plan profile's adapter through the host, not the docume…