[Bug]: Antigravity native slash commands (e.g. /swarm) never appear in the composer #35611
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
Steps to reproduce#
- Set the Antigravity provider's Binary path to an Antigravity CLI ≥ 1.5.0 (
agy, launched asagy acp). - Restart T3 Code.
- Open (or create) an Antigravity thread in any project and type
/. No native Antigravity commands (/swarm,/goal,/teamwork,/plan, …) are listed; only skills appear. - Send any message so an ACP session starts, then type
/again. Still no native commands.
Expected behavior#
The / menu lists the commands the agent advertises via available_commands_update as soon as they are known. They should not be lost on restart, or should be refreshed at startup.
Actual behavior#
The agent does advertise the commands, and the server receives them, but the composer never shows them:
- Commands from a thread session are stored without a cwd. In
AntigravityDriver, the thread runtime'sonSessionEventcallsprovider.onAvailableCommands(event.availableCommands)with nocwd.AntigravityProvider.onAvailableCommands(commands, cwd)only writes aworkspaceSnapshotsentry whencwdis given, so the commands land only in the provider-wideslashCommands. - The per-cwd snapshot taken just before is empty and is trusted for 5 minutes. The workspace refresh calls
snapshotForCwdwhen the thread opens or starts. That happens about 2 s before the agent'savailable_commands_update, so it recordsslashCommands: []. Antigravity'ssnapshotForCwdnever setsslashCommandsPending, so the empty list is stored as complete and stays "current" forPROVIDER_WORKSPACE_SNAPSHOT_TTL_MS(5 min). The client prefersworkspaceSnapshot.slashCommandsover the populated provider-wide list. - Startup never publishes the catalog.
publishCatalog(which forwardsAvailableCommandsUpdated) is only wired to the auth flow'sonAuthenticated. On restart the provider state is rebuilt withslashCommands: [], and nothing repopulates it until a turn is sent.
Related: #31832 (closed feature request for native command parity). This is a separate, concrete bug: the agent sends the commands, but they don't reach the composer.
Impact#
Minor bug or occasional failure
Version or commit#
T3 Code (Nightly) 0.1.10-nightly.20261111.4529
Environment#
macOS 26 (darwin-arm64), Antigravity provider (oauth-personal), Antigravity CLI 1.5.7 via Binary path
Logs or stack traces#
# server.trace.ndjson span names (local time)
00:09:40 AntigravityProvider.snapshotForCwd # workspace snapshot recorded, slashCommands = []
00:09:42 AntigravityProvider.onAvailableCommands # 120 commands arrive (incl. "swarm"), stored provider-wide only
# composer keeps showing the empty cwd snapshot
00:12:53 server.startup # restart: provider slashCommands reset to []
00:13:09 AntigravityProvider.snapshotForCwd # [] again
# Standalone `agy acp`: session/new returns at ~3.59 s, available_commands_update (120 commands) at ~3.62 s.
Workaround#
Typing the full command (for example /swarm <task>) and sending it should work, because buildAntigravityPrompt passes the text unchanged and the agent expands slash commands itself. Only discovery through the / menu is broken.
tanstack-source added labelsbug
juliusmarminge closed this
Sign in to join this conversation.
Confirming this still reproduces on T3 Code
0.1.10(macOS arm64) with T3-managed Antigravity (1.5.10) as well (not only custombinaryPath), and adding two findings from localserver.trace.ndjson+app.asarinspection that explain why the empty/stale list persists permanently rather than only for the 5-minute TTL:1. Why it stays stuck permanently beyond
PROVIDER_WORKSPACE_SNAPSHOT_TTL_MS(5 min)#On the first Antigravity session after server startup,
server.trace.ndjsonshowsAntigravityProvider.onSessionStartedfires ~78 ms beforeAntigravityProvider.onAvailableCommands:Because
AntigravityProvider.onSessionStarted(started, cwd)storesslashCommands: workspace?.slashCommands ?? draft.slashCommandsinsideAntigravityProvider's ownmetadata(draft.workspaceSnapshots), every subsequentsnapshotForCwd(cwd)call — even hours later after TTL expiry — finds thatworkspaceSnapshotsentry and keeps returningworkspace.slashCommands([]) instead of falling back to the populated top-levelsnapshot.slashCommands.It also prevents newly added plugins (e.g. under
config/plugins/<name>/skills/) from ever appearing in/for anycwdthat already ran a session before the plugin was linked/installed, becauseonAvailableCommandshas nocwdandAntigravityDriverhas noinvalidateCaches.2. Startup cache wipe#
On boot,
ProviderRegistryhydratesslashCommandsfromcaches/antigravity.json, butcheckAntigravityProviderimmediately emitsslashCommands: [], andshouldRetainMissingOpenCodeMetadatainProviderRegistry.mergeProviderSnapshotonly retainsslashCommandsforopencode(notantigravity).Suggested fix#
AntigravityProvider.onAvailableCommands, either clear/refresh existingworkspaceSnapshotsentries whencwdis omitted (or pass the sessioncwdfromAntigravityDriver).AntigravityProvider.onSessionStarted/snapshotForCwd, do not prefer an empty/staleworkspace.slashCommandsover a populateddraft.slashCommands(and markslashCommandsPending: trueuntil the firstAvailableCommandsUpdatedarrives).slashCommandsforantigravityduringcheckProvider(similar toopencode), or seedAntigravityProviderfrom the hydrated cache on startup.