Skip to content

Build the acpx 'muse' agent — ACP adapter for the Muse CLI over muse serve (implements #1721) #2012

Open

Description

@dezren39

Implements the design in #1721 (design note: #1721 (comment)). Owner decision 2026-10-28: GO — build it with the design note's rulings.

What this builds

A first-class acpx muse agent for OpenClaw: an ACP adapter whose harness runs the Muse CLI as the agent, backed by muse serve (MSP) on the laptop. This is a harness door into the one Meta pool (the Muse API High Usage plan) via the CLI's sanctioned OAuth login — it is NOT a model route, and the OpenCode muse provider closure of 2026-10-25 stands untouched.

Rulings folded in (from the design note)

  • Q1: first-class door. The adapter sits alongside the existing acpx agents with per-agent command overrides pointing at laptop paths.
  • Q2 (build-blocking): metering and capping are acceptance criteria, not follow-ups — plan-only by construction, a per-session usage ledger, a pre-dispatch pool check, and a per-session turn budget (below).
  • Q3: muse serve is the transport (owner's smoke test: warm turns 7.2–7.8s vs exec 13.3–18.0s). muse exec exists only as the degraded fallback when serve fails before a response is committed.
  • Q4: the adapter owns no credentials and no login lifecycle. Auth is solely the CLI's laptop OAuth login (~/.config/muse/auth.json).

Acceptance criteria

  • acpx muse agent registered and selectable in OpenClaw; an ACP session on it completes a real coding turn end-to-end on the laptop.
  • Plan-only by construction: the child process is spawned with META_API_KEY deleted from its environment; no API-key route exists anywhere in the adapter.
  • Per-session usage ledger: the adapter records turns/usage per session in a durable, readable store.
  • Pre-dispatch pool check: dispatch refuses to start when the freshest Meta pool reading (≤60 minutes old) shows 100%; burns over an hour re-check at least hourly.
  • Per-session turn budget enforced from adapter config.
  • Auth failures (expired/revoked login) surface as a terminal session error — "muse login required on laptop" — never a silent retry, route switch, or interactive login attempt by the adapter.
  • CLI drift handled by probing serve --help / exec --help at startup (the bin/muse-proxy.mjs pattern), never by version-string checks.
  • The OpenCode muse provider remains disabled and untouched by this work.
  • Lands as a worktree branch + PR per fleet discipline (never the primary checkout).

Activity

  1. added
    priority/lowNice to have; do when convenient
    effort/mMedium: expected under 1 day of work
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

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

    Drew's GO on this build was given 2026-10-28, but the enqueue recorded that night landed in repo-health-code-shadow (task 2936) by helper default — never claimable by the pilot lanes, and this issue carried no queue labels, so nothing ever picked it up.

    Remediation (2026-10-31, Oct-28 left-on-the-ground audit):

    • Shadow row cancelled; the task was re-enqueued into repo-health-code-pilot — task 2936 is now queued there (small_fix, priority 50, attempts 0/3, no not_before), verified by direct queue read after the move.
    • queue/queued label added to this issue.
    • Queue signal refreshed.

    The build is now live work for the next code lane shift.

  4. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  6. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed on Nov 1, 2026
  8. 4 remaining items

  9. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: picked-up
    task: 2936 (repo-health-code-pilot, worker repo-worker-code)
    stage: resumed from parked; packet records prior blocker PR #3275 overlapping the acpx muse wiring.
    next: revalidate #2012 and PR #3275 against fresh GitHub state; do not touch files or create competing work if the Drew-owned overlap remains.

  10. added
    queue/claimedQueue worker lifecycle state
    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)
    user/reviewNeeds a user-look: Muse reviews first and handles what it can
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  11. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: blocked
    task: 2936 (repo-health-code-pilot, worker repo-worker-code)
    blocker: Drew decision required. Draft PR #3275 is open, authored by and assigned to Drew, and overlaps home/openclaw/default.nix plus ACP wrapper wiring needed for #2012. I did not touch its branch or create competing work.
    read: #2012 and #1721 remain open; PR #3275 is still a draft. Please decide whether to release the overlap, merge/close #3275 first, or direct coordination. The protocol-gap note is preserved for review.

  12. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · blocked / escalated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

effort/mMedium: expected under 1 day of workmeta/protocol-gapAn agent touched this without the required agent-note comment or labels; needs review of whypriority/lowNice to have; do when convenientqueue/blockedQueue or user escalation statequeue/queuedHas a queued task in the Supabase agent queuestatus/blockedQueue or user escalation stateuser/escalatedQueue or user escalation state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions