Skip to content

Antigravity CLI does not group sessions from different worktrees under one project #1484

Description

@mgcnrx11

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

  1. Create multiple Git worktrees for the same repository.
  2. Run Antigravity CLI sessions from at least two of those worktrees.
  3. Sync the sessions into AgentsView.
  4. 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

  • I searched existing issues for related discussions
  • No private session files or absolute personal paths are included

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions