[Bug]: ACP Registry providers probe commands/skills with the server cwd, so project-scoped commands never appear #24375
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#
- Enable an ACP Registry agent whose CLI supports project commands (e.g.
opencode-v2,distribution: auto). - In a project, create:
<project>/.opencode/command/demo.md<project>/.opencode/command/$demo-skill.md
- Open a thread on that ACP provider in that project.
- 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.cwdisconfig.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-inopencodedriver), not as$-prefixed ACP commands, so even with a correct cwd only command-backed entries appear for ACP providers. AntigravityDriveralready does per-workspace enrichment viasnapshotForCwd(cwd, skills); ACP providers have no equivalent.
Suggested fix#
- Probe ACP providers with the project/thread cwd and re-probe per workspace (as Antigravity does), instead of the server cwd.
- 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).
mrozenvayn(GitHub profile, opens in a new tab) closed this
mrozenvayn(GitHub profile, opens in a new tab) changed the title
mrozenvayn(GitHub profile, opens in a new tab) reopened this
tanstack-source added labelsbug
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), agentdevinCLI 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, noprobe_failedentries). The on-disk cache at~/.t3/tools/devin/cachecontains the full command list: 805 slash commands, including all user-level skills from~/.agents/skillsand~/.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 laterrefreshProviderscalls 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
snapshotForCwdin 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/logsif a maintainer wants them.- The machine-level probe succeeds and is fast (~900 ms in
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.
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_updatelists the repo skills from.github/skills,.claude/skillsand.agents/skills.t3-code-provider-testsession in~/.copilot/session-staterecordscwd: <home>, so the composer list comes from the home-directory probe.Two Copilot-specific details for the fix:
availableCommandsByInstanceis keyed byinstanceIdonly. When a live session publishesavailable_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.$. It sends skill names without a prefix (for examplemy-skill), sonormalizeAcpRegistryCommandsfiles them as slash commands. With Copilot the$list stays empty, even for user-level skills.