Skip to content

fix(antigravity): match workspace history by conversation ID - #21638

Merged
nwparker merged 2 commits into
nwparker/agy-escape-navigationfrom
nwparker/agy-history-workspace
Sep 21, 2026
Merged

nwparker merged 2 commits into
nwparker/agy-escape-navigationfrom
nwparker/agy-history-workspace

Conversation

@nwparker

@nwparker nwparker commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Latest verification — 2026-09-20: Authenticated CLI generation now succeeds on macOS and Windows. The CLI conversation-ID join remains the scope of this PR. Folder labels are addressed by #21640. /tmp versus /private/tmp canonicalization remains outside scope. A real IDE-only history sample still awaits sign-in to the dedicated IDE profile; this is not evidence of IDE history support. All checks at the unchanged PR head are green. Earlier screenshots and test notes below describe their original runs.

Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​65 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​65
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​30 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​21

ELI5

Orca can find an Antigravity conversation but lose track of its folder when the first prompt differs from the history entry or is too long for the displayed title. This matches the conversation's ID instead of guessing from the title, so the session can appear in its workspace history.

What Changed

The workspace resolver prefers an exact conversationId from Antigravity history. The earliest valid matching entry supplies the origin workspace. Prompt/time matching remains only for legacy rows without an ID; a row explicitly naming a different conversation cannot supply a workspace.

This carries @haoliangli's #15775 onto current code and fixes its foreign-ID fallback edge case. Stacked on #21636; this diff changes only history lookup and regressions.

Why

The installed agy writes stable IDs even for later /usage entries. Titles are shortened for display and can reflect an earlier setup prompt, so widening title matching would increase wrong-folder matches. Exact identity avoids that ambiguity while preserving conservative legacy behavior.

Linked Issue

Addresses #15774; continuation of #15775. Kept draft for cross-platform checks and the path-alias/folder-label limitations below.

Visual Proof

Created a fresh isolated conversation with installed agy 1.2.7 using a long initial prompt, then /usage. Both parsers read the same real transcript and history rows:

  • Before: shortened title, cwd: null.
  • After: cwd: /private/tmp/orca-agy-readiness-workspace, from the matching conversation ID.

Real-file before/after comparison

The comparison above is parser evidence displayed in a hidden Orca terminal. A subsequent full build and hidden-app run also verified the session under Workspace scope with the exact recorded folder path:

Rebuilt workspace history panel

The test workspace originally used /tmp/..., while agy recorded /private/tmp/.... Workspace filtering did not equate those macOS aliases; the screenshot follows changing only the isolated test workspace to the exact recorded path. The row also still shows “Unavailable worktree” for this folder workspace. These are remaining adjacent gaps, not fixed by the conversation-ID join. Model generation returned HTTP 401, but agy saved the user turn and history metadata used by this verification. Only this investigation's validation sessions were used; no user transcript content is committed.

Testing

  • Manually verified against newly created installed-agy files
  • Automated regressions added/updated

Ten parser/discovery tests pass, covering mismatched and truncated titles, legacy matching, ambiguous rows, WSL discovery, and foreign conversation IDs. The foreign-ID regression fails against #15775's original logic. A separate temporary live-file probe verified the before/after result above. Full pnpm tc, changed-code quality, pre-commit checks, and full pnpm build pass. The build includes desktop, CLI, web/mobile bundles and macOS native components at stack head e783bc9b67b.

Review

The existing execution-host-scoped history transport is reused for local, WSL, and remote scans; there are no new paths, wire fields, or credentials. Real Linux/WSL/SSH/Windows runs and path-alias/folder-label fixes remain pending. This does not add IDE transcript discovery or token/cost analytics.

Agent skill upstream boundary

  • Not applicable; no upstream skill source copied.

Checklist

  • Focused change with ELI5, mechanism, alternatives, and risks explained
  • Real-file before/after evidence attached
  • Self-reviewed for correctness, security, performance, platform and SSH impact
  • Full build and rendered Workspace-scope verification with exact recorded path
  • Remaining platform validation and adjacent path-alias/folder-label gaps

@nwparker

Copy link
Copy Markdown
Contributor Author

The folder-label/navigation gap found in this PR's real agy UI check now has a separate draft fix: #21640. It reuses the history matcher and resume host checks for folder workspaces, with 67 focused passing tests and before/after CDP screenshots. The actual Jump to Workspace action returns to the recorded folder. /tmp versus /private/tmp canonicalization remains unresolved; successful authenticated agy generation is still unverified.

@nwparker

Copy link
Copy Markdown
Contributor Author

Verification update (2026-09-20):

  • Focused Antigravity history scanner tests: 7 passed.
  • pnpm tc:node: passed.
  • Changed-code quality gate: 0 new findings across 42 changed files.
  • Existing PR checks at the unchanged head are green.

Merge verdict: Approve scoped to CLI conversation-ID history joins, in stack order. This preserves the exact-ID match behavior and the PR's authenticated local macOS/native Windows generation evidence. Dedicated IDE-only history remains unverified; folder labels belong to #21640, and /tmp versus /private/tmp canonicalization is outside scope.

@nwparker

Copy link
Copy Markdown
Contributor Author

Fresh CI rerun: green.

ELI5: Orca now reconnects history to the right workspace conversation instead of mixing sessions with similar metadata. Tests and CI are green; merge verdict: approve scoped history behavior.

@nwparker
nwparker marked this pull request as ready for review September 21, 2026 03:58
@pullfrog

pullfrog Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

This run was cancelled 🛑

The workflow was cancelled before completion. Please check the link below for details.

Pullfrog  | View workflow run | via Pullfrog | 𝕏

@nwparker
nwparker merged commit 909c3b3 into nwparker/agy-escape-navigation Sep 21, 2026
60 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant