Skip to content

[Bug]: /compact on an ACP registry agent fails right after session/load, before available_commands_update arrives #39880

Closed

Description

@SamuelZ12

Area: packages/provider-acp

Steps to reproduce

  1. Add omp as a local ACP registry agent (omp acp, omp 19.0.1).
  2. Open a thread, send a message, then leave it idle for 30 minutes so T3 closes the session.
  3. Send /compact as the next message.

Expected behavior

T3 reloads the session and forwards /compact to omp, which advertises compact and handles it.

Actual behavior

The run fails with "This provider does not support /compact. Start a new thread to continue with a fresh context."

Cause

The adapter rejects /compact unless advertisedCommandNames for the session already contains compact. After session/load that map is empty until the agent's available_commands_update arrives. omp sends that update about 50 ms after the session/new, session/load or session/resume response, on purpose, to avoid Zed dropping notifications for a session it doesn't know yet (zed-industries/zed#55965). The provider log shows session/load succeeding at 20:20:13.077 and the run failing at 20:20:13.090.

Suggested fix

When the session was just loaded and no available_commands_update has arrived yet, wait briefly for it before deciding, or forward /compact and let the agent reject it.

Environment

T3 Code 0.1.10 server on macOS arm64, omp 19.0.1.

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