Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: ACP Registry providers probe commands/skills with the server cwd, so project-scoped commands never appear #24375

Openmrozenvayn(GitHub profile, opens in a new tab) opened this issue 3 comments

Area

apps/server (provider layer) / packages/provider-acp-registry

Summary

ACP Registry providers are probed for available_commands with cwd: host.paths.cwd — the server process working directory — instead of the project being viewed. Commands that a CLI scopes to the project therefore never reach the composer, for that project. Only commands from the agent's global config are listed.

Because ACP skills are derived from command names that start with $ (normalizeAcpRegistryCommands), project-scoped skill-like entries are invisible for the same reason.

Steps to reproduce

  1. Enable an ACP Registry agent whose CLI supports project commands (e.g. opencode-v2, distribution: auto).
  2. In a project, create:
    • <project>/.opencode/command/demo.md
    • <project>/.opencode/command/$demo-skill.md
  3. Open a thread on that ACP provider in that project.
  4. Press / and $.

Expected behavior

demo appears in the / list and demo-skill appears in the $ list, matching what the agent advertises for that working directory.

Actual behavior

Neither appears. Only globally scoped commands are listed (built-ins plus anything under the agent's global config dir). A global $<name>.md command does appear as a skill, which confirms the $ mapping itself works.

Evidence

Talking to the same agent binary directly over ACP with the project cwd advertises the project commands:

{"sessionUpdate":"available_commands_update","availableCommands":[
  {"name":"init","description":"guided AGENTS.md setup"},
  {"name":"review","description":"review changes [commit|branch|pr], defaults to uncommitted"},
  {"name":"$demo-skill"},
  {"name":"demo"},
  {"name":"compact","description":"Compact the session"}]}

The first advertisement arrives immediately after session/new, so this is not a timing/grace-window issue. Running the same handshake with the server's cwd returns the built-ins only.

Root cause

  • checkAcpRegistryProviderStatus({ ...readinessInput, cwd: host.paths.cwd }, probeAcpRegistryConfiguration) in the ACP Registry driver.
  • ProviderHost.paths.cwd is config.cwd, i.e. the directory the server/desktop app was started from, not the selected project.
  • The composer reads skills/commands from the provider snapshot (resolveProviderSkillsForCwd), so the wrong cwd is baked into the picker before any thread session exists.

Notes

  • opencode exposes real skills through its own CLI API (/api/skill, used by the built-in opencode driver), not as $-prefixed ACP commands, so even with a correct cwd only command-backed entries appear for ACP providers.
  • AntigravityDriver already does per-workspace enrichment via snapshotForCwd(cwd, skills); ACP providers have no equivalent.

Suggested fix

  1. Probe ACP providers with the project/thread cwd and re-probe per workspace (as Antigravity does), instead of the server cwd.
  2. Optionally add skill discovery for ACP providers on top of the command list, so real skills are available rather than only $-prefixed commands.

Version

T3 Code v0.1.2, Linux desktop build. Agent: opencode 2.1.4 (opencode acp).

  1. Same root cause with GitHub Copilot CLI 1.0.105 (ACP Registry) on Windows, T3 Code desktop 0.1.4.

    • copilot --acp, session/new { cwd: <repo> }: available_commands_update lists the repo skills from .github/skills, .claude/skills and .agents/skills.
    • The same handshake with cwd = home lists none of them.
    • Every t3-code-provider-test session in ~/.copilot/session-state records cwd: <home>, so the composer list comes from the home-directory probe.

    Two Copilot-specific details for the fix:

    1. Commands are stored per instance, not per project. availableCommandsByInstance is keyed by instanceId only. When a live session publishes available_commands_update, that list replaces the one for every Copilot thread, so threads in different repos overwrite each other. Fixing the probe cwd alone leaves this open; the stored commands need a cwd or thread key as well.
    2. Copilot advertises skills without $. It sends skill names without a prefix (for example my-skill), so normalizeAcpRegistryCommands files them as slash commands. With Copilot the $ list stays empty, even for user-level skills.
  2. tanstack-source added labelsbug

  3. Same root cause with the Devin ACP Registry provider on macOS, T3 Code desktop 0.1.12.

    Setup: provider acpRegistry_devin (the only enabled provider), agent devin CLI 3000.15.14, installed by T3 under ~/.t3/tools/devin/.

    What I see:

    • The machine-level probe succeeds and is fast (~900 ms in server.trace.ndjson, AcpRegistryProbe.probeConfiguration, no probe_failed entries). The on-disk cache at ~/.t3/tools/devin/cache contains the full command list: 805 slash commands, including all user-level skills from ~/.agents/skills and ~/.claude/skills. So Devin advertises everything correctly, even for global (non-project-scoped) commands.
    • Despite that, the composer / menu in a fresh thread shows nothing / "No matching command" until the first message of the thread is sent. In threads with a running session, the menu fills in. This matches the timing half of #26460: the first workspace snapshot is stitched from the pending placeholder and later refreshProviders calls early-exit, so nothing revisits it.
    • Since the probe result demonstrably contains the commands (cache file), the wrong-cwd half of this issue is not what hides them here (they are user-global). What hides them is that the composer never receives them before the first real session: no per-cwd workspace snapshot is ever stored for ACP providers (no snapshotForCwd in the driver), and the machine snapshot's command list apparently doesn't reach the composer for a new thread in this state.

    Repro: fresh-launch the app, open a project, new thread, select the Devin ACP provider, type / in the composer before sending anything: empty. Send any message, wait for the agent to start, type / again: full list appears.

    Happy to pull specific spans from ~/.t3/userdata/logs if a maintainer wants them.

  4. One note on the resolution path, since the related fix PRs (#34965, #30668) were closed with the reasoning that OpenCode has its own supported driver and ACP Registry changes for it aren't taken:

    That reasoning doesn't cover Devin. Devin has no native T3 Code driver at all: the ACP Registry route is the only way to use it. As it stands, every Devin user on T3 Code gets a slash menu that is randomly empty depending on a startup race, with no alternative driver to switch to. If the per-workspace probe fix only lands for agents without a native driver, Devin would still be the case that needs it most.

Sign in to join this conversation.