Skip to content

[Bug]: ACP Registry cache never expires, so agents break once their cached version is removed upstream #40257

Closed

Description

@mnismt

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server (ACP Registry)

Steps to reproduce

  1. Enable an ACP Registry agent (e.g. Devin) on a server so caches/acp-registry/registry.json is written.
  2. Wait until the agent publishes a new version and removes the old build from its CDN (or edit the cached file so the agent's binary archive URL points at a version that returns 403/404).
  3. Restart the server, or open the provider on a machine where that binary isn't installed yet.

Expected behavior

The provider resolves the current registry version and installs it.

Actual behavior

The provider shows Needs attention · Could not download ACP Registry agent devin 3000.12.57. and stays that way until someone browses the registry in settings or deletes the cache file.

The cached registry.json (5 days old) still listed Devin 3000.12.57, whose archive now returns 403; the live registry lists 3000.14.30821. Another machine whose cache happened to be refreshed more recently worked fine.

Cause, in AcpRegistryCatalog:

  1. The disk cache has no expiry. loadRegistry returns the in-memory registry, else readCachedRegistry from disk, and only calls refreshRegistry() when no cache file exists. Readiness checks and thread starts go through loadRegistry, so they use a cache of any age. Only recentRegistry (search/browse, REGISTRY_SEARCH_MAX_AGE_MS) and prepare refresh it.
  2. A failed download doesn't refresh and retry. When installBinary can't fetch the pinned version, the error goes straight to the provider status; the registry is never re-fetched to find a newer version.

Suggested fix (either would have prevented it):

  • Give the disk cache a max age in loadRegistry (e.g. reuse REGISTRY_SEARCH_MAX_AGE_MS, or daily), falling back to the stale copy only if the fetch fails.
  • On a download failure in installBinary, call refreshRegistry() once and retry with the newly resolved version.

Related but different: #37548 (no cache at all), #34242 (stale model list).

Impact

Major degradation or frequent failure: every agent release can break the provider on servers with an older cache.

Version or commit

0.1.12-nightly.20261121.5038

Environment

Linux x86_64 server (systemd user service), paired from the macOS desktop app.

Logs or stack traces

AcpRegistryCatalog.resolve -> Failure
AcpRegistryOperationError: Could not download ACP Registry agent devin 3000.12.57.
    at toAcpRegistryOperationError (.../t3:233881:9)

curl -sI https://static.devin.ai/cli/3000.12.57/devin-3000.12.57-x86_64-unknown-linux.tar.gz → HTTP/2 403

Workaround

Fetch https://cdn.agentclientprotocol.com/registry/v1/latest/registry.json over the cached registry.json and restart the server.

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