Skip to content

Nix-package the Claude/Codex ACP adapters — repoint OpenClaw acpx off tmp/plugin-captures #1711

Open

Description

@dezren39

Problem

OpenClaw's Claude and Codex ACP bridges currently execute out of a plugin-admission staging dir in tmp:

  • ~/.openclaw/acpx/claude-agent-acp-wrapper.mjs and codex-acp-wrapper.mjs hardcode installedBinPath into ~/.openclaw/tmp/plugin-captures/83a9d889-def6-4444-ae9f-201611c1afd1/captures/openclaw-plugin-build-*/package-*/node_modules/@agentclientprotocol/{claude-agent-acp,codex-acp}/dist/index.js
  • That capture is 1.6 GB and load-bearing: deleting it breaks OpenClaw's Claude/Codex ACP coding path. Two sibling captures (1.3 GB, unreferenced) were already deleted 2026-10-28.
  • tmp/ is excluded from the openclaw-backup job (by design — it is scratch), so the bridges have no backup coverage and no reproducible install path. Drew's ruling 2026-10-28: package them with Nix like everything else, expose stable symlinks, point the config at those.

Current state (verified 2026-10-28)

  • OpenClaw itself + all runtime plugins already load from /nix/store (nix-openclaw overlay); claude, codex, opencode CLIs are already system-installed (/run/current-system/sw/bin).
  • The OpenCode ACP agent already uses the system binary: acpx config agents.opencode = { command: /etc/profiles/per-user/user/bin/opencode, args: [acp] }. The gateway's allowedAgents is [opencode]; the Claude/Codex wrappers are wired but dormant.
  • Only the two adapter packages (@agentclientprotocol/claude-agent-acp, @agentclientprotocol/codex-acp — small Node programs that spawn the agent CLIs) are missing from the store.

Plan

  1. First check whether the adapters already ship inside the nix-openclaw acpx runtime plugin's store path — if yes this is a repoint, not a packaging job.
  2. Otherwise add flake packages for both adapters (buildNpmPackage pattern, following the pkgs/ conventions in this repo).
  3. Wire stable entrypoints via the OpenClaw home module (symlinks under ~/.openclaw/acpx/bin/ or ~/bin), and repoint the wrappers / acpx agent config at them. Follow the provider-switchboard rule: keep the old capture path recoverable until verification passes.
  4. Verify an ACP handshake/session for both adapters directly (stdio/acpx smoke), and that the gateway stays healthy.
  5. Only after verification: delete the 83a9d889 capture and the wrappers' tmp dependency.

Out of scope

  • Changing the gateway allowedAgents policy (whether Claude/Codex ACP agents get enabled is Drew's call, separate from this packaging fix).
  • The OpenCode agent path (already system/Nix).
  • home/openclaw's extraction to the private openclaw-personal repo (separate tracked work).

Acceptance

  • Both adapters resolve from Nix store paths via stable symlinks; no path under ~/.openclaw/tmp is referenced by the wrappers or acpx config.
  • ACP smoke test passes for claude-agent-acp and codex-acp against the system CLIs.
  • The 1.6 GB capture is deleted; ~/.openclaw/tmp holds only genuine scratch.
  • Gateway + the existing OpenCode ACP path verified healthy after the change.

Acceptance criteria

  • Both ACP adapters (@agentclientprotocol/claude-agent-acp and @agentclientprotocol/codex-acp) resolve from Nix store paths via stable symlinks (home-manager wiring); no path under ~/.openclaw/tmp is referenced by the wrappers or the acpx config.
  • ACP initialize/session smoke tests pass for both adapters against the system CLIs.
  • The 1.6 GB plugin-captures tree is deleted after verification; ~/.openclaw/tmp holds only genuine scratch.
  • The OpenClaw gateway and the existing OpenCode ACP path are verified healthy after the change, and the change lands as a worktree branch + PR.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · state: handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: repo-fleet-monitor run 2026-10-28 11:19 CDT; queue task 1930
    • Found via: monitor reconciliation
    • Task: Queue task 1930 (fix packet for this issue) was cancelled by the monitor (reason: superseded). Reconciliation found the issue carries no queue/* labels and was assigned to Drew (dezren39) at 15:49Z, after the task was enqueued at 15:37Z — the issue reads as taken over outside the queue flow, so the queued task was closed out to keep the pool truthful and prevent double-booking.
    • Expectation: If this should still be worked by the queue worker instead, re-enqueueing the same packet revives task 1930 (the monitor verified this revival behaviour on task 1936 this run) and queue/queued should be applied to the issue in the same action.
    • Links: queue task 1930 (cancelled, repo-health-code-pilot)
  3. added
    kind/infrastructureInfrastructure / host-portability work
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    area/nixNix expressions, flakes, and packaging
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 28, 2026
  4. removed their assignment
    on Oct 28, 2026
  5. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    🤖 Orchestrator note · state: re-queued

    • The fleet monitor cancelled queue task 1930 at 11:19 CDT reading the dezren39 assignment (15:49Z) as a human takeover outside the queue flow. That inference was wrong: the assignment appeared during the orchestrator's own ACP-enablement work this morning, and nobody is hand-working this issue — PR openclaw: enable claude, codex, agy as ACP agents alongside opencode #1728 (the allowedAgents enablement) explicitly does NOT do the adapter repoint; it still points acpx at the wrappers in the load-bearing plugin capture, which is exactly what this issue removes.
    • Action taken: task 1930 re-enqueued with the same packet (verified back to queued in repo-health-code-pilot), queue/queued label applied, and the assignee removed so the takeover signal does not re-fire.
    • Expectation: the queue worker picks this up in the normal rotation; the capture directory is deleted only after the ACP smoke tests in the packet pass.
  6. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Intake review

    • Related: Consider: an acpx 'muse' agent — ACP adapter for the Muse CLI (plan-quota coding harness for OpenClaw) #1721 (considering a muse ACP agent) is today's sibling OpenClaw ACP item. Queue state: see the monitor's agent note above — queue task 1930 was cancelled during reconciliation because this issue carries no queue/* labels and was assigned to Drew at 15:49Z; re-enqueueing the same packet revives it if queue handling is wanted.
    • Notes: Intake pass: the body's Plan and Acceptance sections are complete (formalized as Acceptance criteria below them); labels normalized (kind/infrastructure, priority/normal, effort/s, area/nix). The queue packet's stated timebox was 120 minutes and its priority_reason records Drew's approval of the packaging direction.
    • Risks: Medium per the original packet: the wrappers sit on OpenClaw's live coding path — the old capture must stay until the smoke tests pass, and gateway enablement (allowedAgents) is explicitly out of scope.
    • Suggested approach: As the body's Plan: check whether the adapters already ship in the nix-openclaw acpx plugin store path before packaging anything new.
  7. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    Status — owner order 2026-10-28, stalled, re-queued/repaired 2026-10-31.

    This issue was labelled queue/queued and its fix task (task 1930, repo-health-code-pilot) was enqueued 2026-10-28 — but it was never claimed in 3 days, and its attempt cap sat at 2 while the fleet standard moved to 4.

    Verified + repaired 2026-10-31 (Oct-28 left-on-the-ground remediation), by direct queue read:

    • Task 1930: status queued, attempts 0, not_before null, no lease — live and claimable.
    • max_attempts raised 2 → 4, matching the fleet-wide preventive cap standard set 2026-10-28.
    • Queue signal refreshed.

    The 1.6 GB capture 83a9d889 still cannot be deleted until this lands (it is load-bearing for the acpx wrappers) — this task is the gate.

  8. 250 remaining items

  9. added and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: picked_up
    task: 1930 (small_fix, repo-health-code-pilot; worker repo-worker-code; OpenChamber scheduled lane 335a5d1f-bfc1-4831-99ea-850c8939a727)
    by: openchamber-scheduled-lane
    at: 2026-11-04T19:45:00Z

    Fresh metadata confirms issue #1711 is OPEN and assigned to dezren39; task-bound PR #3275 is OPEN draft, authored and assigned to dezren39. This is the existing Drew-owned hard stop. I have not inspected PR contents, branch/worktree, credentials, capture, or live OpenClaw state, and have made no code changes. Next: park for 30 minutes; resume only after explicit ownership handoff/release and dedicated live-ops authorization.

  11. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 4, 2026
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: parked
    task: 1930 (small_fix, repo-health-code-pilot; worker repo-worker-code; OpenChamber scheduled lane 335a5d1f-bfc1-4831-99ea-850c8939a727)
    by: openchamber-scheduled-lane
    at: 2026-11-04T19:46:00Z

    Parked for 30 minutes. Fresh metadata: issue #1711 is OPEN and assigned to dezren39; task-bound PR #3275 is OPEN draft, authored and assigned to dezren39. No ownership release/handoff is present. This lane did not inspect PR contents/diff, branch/worktree, credentials, capture, or live OpenClaw state and made no code changes.
    labels: queue/parked and status/parked set; queue/claimed and status/in-progress removed; work/assigned retained.
    resume: re-fetch issue #1711 and PR #3275 metadata; proceed only after explicit ownership handoff/release and dedicated live-ops authorization.

  13. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · escalated

  14. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    user/escalatedQueue or user escalation state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/nixNix expressions, flakes, and packagingeffort/sSmall: expected under 2 hours of workkind/infrastructureInfrastructure / host-portability workmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)queue/blockedQueue or user escalation statesource/creatorFiled by the new-issue-creator jobstatus/blockedQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this itemuser/escalatedQueue or user escalation statework/assignedQueue worker lifecycle state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions