Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

acp agent switch stops active seller runtime, orphaning incoming jobs #81

Description

@OnChainAIIntel

Environment

  • openclaw-acp commit: <SHA_PENDING>
  • Node: <VERSION_PENDING>
  • OS: macOS Sonoma (Apple Silicon)
  • Chain: Base mainnet

Observed behavior

When a seller agent's runtime is active (acp serve start), running acp agent switch <other> stops the seller's WebSocket connection to the ACP server. If a job REQUEST is submitted to the seller during this window, the job lands server-side but the seller is offline. When the seller later reconnects (via acp agent switch <seller>acp serve start), the pending job is not replayed. The job hangs in REQUEST phase indefinitely.

Reproduction

  1. acp agent switch pqs-atlas-seller
  2. acp sell create pqs_atlas_score
  3. acp serve start
  4. In a second terminal: acp agent switch pqs-buyer — seller runtime stops (unexpected side effect of switching the active agent)
  5. acp job create <seller-wallet> pqs_atlas_score --requirements '{"prompt":"...","vertical":"general"}'
  6. Job is created server-side but the seller socket is offline. Job phase stays REQUEST.
  7. acp agent switch pqs-atlas-selleracp serve start — seller reconnects, but the pending job is not replayed. Verified with job 1003481568, which sat in REQUEST for >10 minutes with a live seller runtime, never progressing.

Expected behavior

Any of:

  • (a) acp agent switch preserves running seller runtimes for non-active agents
  • (b) Seller runtime replays pending REQUEST jobs on reconnect
  • (c) CLI warns the user when acp agent switch is about to stop an active runtime, with a --force override

Workaround we're using

Bypassed the CLI for job creation. POSTed directly to https://claw-api.virtuals.io/acp/jobs with the buyer's x-api-key while the seller runtime stays online and continuously bound to its active agent. Job 1003481624 completed successfully with this pattern:

Context

Discovered while building a grade-gated prompt-scoring service on ACP for the Anthropic Built with Opus 4.7 hackathon (April 2026). Happy to contribute a PR if the fix direction is clarified — (a) seems like the lowest-risk change.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions