Summary
When the Sessions sidebar is grouped by Project, Antigravity CLI sessions from different worktrees are displayed as separate project groups. The same worktree layout is grouped correctly for Codex sessions.
Steps to reproduce
- Create multiple Git worktrees for the same repository.
- Run Antigravity CLI sessions from at least two of those worktrees.
- Sync the sessions into AgentsView.
- In the Sessions sidebar, choose Group by Project.
Expected behavior
Sessions from different worktrees of the same repository should appear under one project group, consistent with Codex.
Actual behavior
Each Antigravity CLI workspace path is treated as a separate project, so the worktrees appear as separate project groups.
Technical context
The Antigravity CLI provider reads the workspace value from history.jsonl and passes it unchanged as ProjectHint. The parser then uses that non-empty hint directly as ParsedSession.Project. It does not run the shared project/worktree normalization used by Codex (ExtractProjectFromCwdWithBranch), and the parsed Antigravity CLI session does not populate ParsedSession.Cwd.
As a result:
- the stored sessions.project value is the raw workspace path;
- the sync-stage worktree resolver is skipped because it requires a non-empty cwd;
- the frontend groups by the raw session.project value.
A likely fix is to reuse the shared project extraction logic for Antigravity CLI workspaces, while preserving the workspace path as Cwd where appropriate. Please add a regression test proving that two worktree paths for the same repository produce one project group.
Related discussions
Checklist
Summary
When the Sessions sidebar is grouped by Project, Antigravity CLI sessions from different worktrees are displayed as separate project groups. The same worktree layout is grouped correctly for Codex sessions.
Steps to reproduce
Expected behavior
Sessions from different worktrees of the same repository should appear under one project group, consistent with Codex.
Actual behavior
Each Antigravity CLI workspace path is treated as a separate project, so the worktrees appear as separate project groups.
Technical context
The Antigravity CLI provider reads the workspace value from history.jsonl and passes it unchanged as ProjectHint. The parser then uses that non-empty hint directly as ParsedSession.Project. It does not run the shared project/worktree normalization used by Codex (ExtractProjectFromCwdWithBranch), and the parsed Antigravity CLI session does not populate ParsedSession.Cwd.
As a result:
A likely fix is to reuse the shared project extraction logic for Antigravity CLI workspaces, while preserving the workspace path as Cwd where appropriate. Please add a regression test proving that two worktree paths for the same repository produce one project group.
Related discussions
Checklist