Repository navigation
Description
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
- Configure a second Antigravity provider instance (e.g.
antigravity-2) in Settings and run several turns on it so conversation databases are written under<stateDir>/providers/antigravity/<sha256("antigravity-2")>/antigravity-acp/conversations/*.db. - Open Usage → Tokens / Cost and confirm the turns appear in the Antigravity totals.
- Remove
antigravity-2fromproviderInstances(for example after consolidating accounts or retiring a secondary instance). The profile directory and itsconversations/*.dbfiles remain on disk under<stateDir>/providers/antigravity/. - Re-open Usage → Tokens / Cost (or wait for the next scan).
Expected behavior
Historical Antigravity usage stored under <stateDir>/providers/antigravity/*/antigravity-acp/conversations/*.db continues to be counted on the Usage screen even after a provider instance is removed, renamed, or routed to another profile directory under <stateDir>/providers/antigravity/.
Actual behavior
All usage recorded under the removed instance's profile directory vanishes immediately from the Usage charts and totals.
In apps/server/src/provider/Drivers/AntigravityUsage.ts, AntigravityUsage.scan only adds profile roots by iterating the currently configured instances and computing resolveAntigravityInstanceDirectories(host.paths.stateDir, instanceId).profile + "/antigravity-acp":
- Any profile directory under
<stateDir>/providers/antigravity/*whoseinstanceIdis no longer insettings.providerInstances(or any extra profile directory stored under<stateDir>/providers/antigravity/by a custombinaryPathwrapper) is never scanned. - Unlike Claude Code (
~/.claude/projects) or Codex (~/.codex/sessions), whose historical transcripts survive provider reconfiguration because the scanner walks the shared root, Antigravity history silently disappears as soon as an instance is removed.
Suggested fix: In AntigravityUsage.scan, also list immediate subdirectories of <stateDir>/providers/antigravity/ that contain an antigravity-acp directory and include <dir>/antigravity-acp in the scanned roots (deduplicated through the existing conversationDirs Set and realPath normalization).
Impact
Minor bug or occasional failure
Version or commit
0.1.13-nightly.20261125.5245
Environment
Linux x86_64, T3 Code server 0.1.13-nightly.20261125.5245, Antigravity ACP 1.5.16
Logs or stack traces
# On disk under ~/.t3/userdata/providers/antigravity/:
# - ac0a3dfd... (active `antigravity` instance): scanned
# - 97f81140..., 404f29b3..., 373bb5ce... (previously configured instances): omitted by AntigravityUsage.scan once removed from providerInstances
Workaround
Set ANTIGRAVITY_DATA_DIR on providerInstances.antigravity.environment to a comma-separated list of the <profileDir>/antigravity-acp directories that should remain visible in Usage.
Activity