Repository navigation
feat: show Antigravity terminal sessions in Chat UI - #21660
Conversation
Co-authored-by: haoliangli <[email protected]>
|
Verification update, 2026-09-20 — merge verdict: hold. On the exact stack head A real Do not promote this PR until waiting-for-permission is visible and actionable, with raw PTY capture evidence for any new terminal-screen rule and status owned by the host hook store. Direct SSH remains terminal-only by design. WSL authentication and paired Chat remain unverified. Current CI is green, which does not resolve this finding. The owned Chat terminal/app were closed. Hook script before/after snapshots match and the original global hook config is unchanged; no credential settings were rewritten. |
|
Independent verification update:
Scoped verdict: Approve only together with #21776, in stack order, for the verified macOS/native and Windows-backed Chat paths. WSL, paired-runtime Chat, and direct SSH Chat remain unverified or intentionally unsupported. |
|
Independent verification (2026-09-20):
Verdict: approve only with #21776, in stack order, for the tested native Chat path. WSL/paired-runtime/direct-SSH Chat remain unverified or unsupported. No merge performed. |
ELI5 / evidence / trade-offs auditELI5: Orca can start a real Antigravity chat session and keep its conversation tied to the right workspace. Proof: Transcript/session tests, sanitized rendered Chat proof, and CI pass. User-facing trade-off: Chat behavior depends on the installed agy version and configured authentication. This note scopes the claim to the evidence above; it does not claim untested remote, SSH, WSL, or vendor combinations. |
aa00abf
into
nwparker/agy-continuation-readiness
…21657) * fix(antigravity): wait for host-confirmed composer before continuation paste * feat: show Antigravity terminal sessions in Chat UI (#21660) * feat: render Antigravity terminal sessions in native chat Co-authored-by: haoliangli <[email protected]> * fix: keep direct SSH Antigravity chat on its execution host --------- Co-authored-by: haoliangli <[email protected]> --------- Co-authored-by: haoliangli <[email protected]>
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
- Antigravity JSONL decoder — new
transcript-line-decoders-antigravity.tsmapsUSER_EXPLICIT/USER_INPUT(withUSER_REQUESTunwrap),MODEL/PLANNER_RESPONSE(thinking, text,tool_calls[].args), andMODELtool steps to the native-chat message model, emitting no turn lifecycle so host-owned hook status stays authoritative. - Read paths — the decoder is wired into the full reader, the tail reader, the legacy journal import, and the decoder barrel; full-read and tail-read parity is asserted by test.
- Path resolution —
session-file-resolver.tsderives<antigravityBrainDir|~/.gemini/antigravity-cli/brain>/<id>/.system_generated/logs/transcript.jsonland rejects non-[A-Za-z0-9_-]ids, so a conversation id can never be a caller-supplied path. - Agent support and direct SSH —
antigravityjoins the supported-agent list andnativeChatRequiresLocalTranscript, which keeps a Model-A direct-SSH pane on the terminal;agent-session-resume.tsnow retains the hooktranscriptPathfor host-owned reads. - Mixed versions — new
native-chat.antigravity.v1capability plusguardAntigravityChatTransport, which probes the owning host before read/subscribe and distinguishesRUNTIME_NATIVE_CHAT_TOO_OLDfromRUNTIME_NATIVE_CHAT_READ_ERROR.
I verified the capability probe checks the same host the chosen transport reads from in all three cases (desktop local, web client paired runtime, paired runtime), and that the direct-SSH entry gates hold in steady state (the isChatViewMode early return is only consumed by chat→terminal actions). The 110 focused tests pass.
ℹ️ Real transcript shapes rest on an uncommitted offline check
Every decoder field assumption is pinned only by the synthetic fixture, whose README states the step numbers are synthetic. The PR body's "309 records decoded across five samples" comes from an offline script that is not in the repo, so the load-bearing shape assumptions are not reproducible from the repository.
Technical details
# Unpinned decoder shape assumptions
## Affected sites
- `src/main/native-chat/transcript-line-decoders-antigravity.ts:102-105` — tool output is read only from `record.content`; the sibling Grok decoder reads `content ?? output ?? result`. If a real tool step stores output elsewhere, every result row is silently dropped.
- `src/main/native-chat/transcript-line-decoders-antigravity.ts:12-21` — `TOOL_STEP_TYPES` is a closed whitelist; any real step type outside it drops its output with no fallback.
- `src/main/native-chat/transcript-line-decoders-antigravity.ts:33-37` — message id is `step_index`; the live assembler discards a same-source record on an id hit (`native-chat-session-assembler.ts`), so a real transcript that emits two records per step would lose all but the first.
- `src/main/native-chat/__fixtures__/antigravity/tool-turn.jsonl` — the only committed sample.
## Required outcome
- A committed, sanitized real-shape fixture (or a shape test) that pins the tool-result field name, the tool-step type vocabulary, and step-index uniqueness, so the "309 preserved" claim is checkable and a schema drift fails a test rather than silently dropping rows.
## Open questions for the human
- Did the five offline samples include a tool step with empty output and a step whose type is outside the current whitelist? Empty output currently produces no result row at all.ℹ️ Nitpicks
docs/reference/antigravity-native-chat.mdis tracked via force-add;.gitignorehas no!docs/reference/antigravity-native-chat.mdline, so a cleangit addskips it. Optional per repo norm.- The decoder test's
it.eachexercises 7 of the 8TOOL_STEP_TYPES;SEARCH_WEBis never asserted. native-chat-antigravity-capability.ts's barecatchmaps a protocol-compat block toRUNTIME_NATIVE_CHAT_READ_ERROR, whereastoRuntimeNativeChatErrorMessagemaps that same error toRUNTIME_NATIVE_CHAT_TOO_OLDfor other agents. Likely unreachable if an incompatible host cannot be connected to at all, so flagging only as a low-confidence inconsistency.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| const rawContent = extractString(record.content) ?? '' | ||
| const text = extractAntigravityUserRequest(rawContent) || rawContent | ||
| if (!text.trim()) { | ||
| return null |
There was a problem hiding this comment.
extractAntigravityUserRequest returns null for an empty <USER_REQUEST></USER_REQUEST> body, so the || rawContent fallback emits the raw wrapper text as a user bubble with literal tags. The pre-existing AI Vault reader (consumeAntigravityRecordLine) drops those records instead. Removing the fallback matches it without losing anything: extraction already returns the whole content when there is no opener.
| const rawContent = extractString(record.content) ?? '' | |
| const text = extractAntigravityUserRequest(rawContent) || rawContent | |
| if (!text.trim()) { | |
| return null | |
| const rawContent = extractString(record.content) ?? '' | |
| const text = extractAntigravityUserRequest(rawContent) | |
| if (!text) { | |
| return null | |
| } |
Recover scoped transcript, terminal approvals, and WSL support on current main. Keep hook-server authority, captured-grid rules, quiescence, and current journals. Negotiate Antigravity reads and subscriptions on desktop, web, and mobile. Credits #15773, #21660, #21776, and #24141. Co-authored-by: haoliangli <[email protected]> Co-authored-by: sojiro-o <[email protected]>


Latest verification — 2026-09-20: Merge verdict: approve only together with #21776, in stack order. Native Windows real hooks attach the transcript; Chat composer generation, tool completion, and the actual Allow/Deny controls pass on combined head
646935991b6. The follow-up fixes the previous invisible approval and stale waiting after acceptance: Needs permission clears within 204 ms during an eight-second command, then completion renders Done. Deny interrupts and returns idle. Both PR heads have successful latest CI checks. Direct SSH remains terminal-only; live WSL and paired-runtime Chat are still unverified. Earlier screenshots and notes below describe their original runs. No merge or draft promotion was performed.ELI5
Antigravity conversations can now open in Orca's experimental Chat UI. Orca reads the conversation agy saved and sends composer input to the same terminal.
What Changed
Adds Antigravity to the supported-agent list and opt-in default-chat flow. One decoder feeds full reads, live tails, and journal imports. It preserves real planner text,
tool_calls.args, and tool-specific MODEL results. Hook-reported transcript paths are retained; exact host/WSL path rules remain in force. Direct SSH panes stay in the terminal because that route has no native-chat transcript transport; an absolute remote path must never be opened on the client. Local and paired-runtime panes remain eligible. Older paired hosts receive an explicit update error via the newnative-chat.antigravity.v1capability check.Why
Takes over #15773 with its author credited. Running that candidate against five real saved transcript samples dropped all 309 tool/activity records and marked intermediate planner responses as completed turns. This implementation preserves those records and leaves completion with the existing host-owned status system. A planner step marked DONE is not a completed user turn.
This adds terminal-backed chat, not an Antigravity structured-session provider. Cursor support is outside this PR.
Linked Issue
Refs #20157; takes over #15773. Stacked on #21657.
Visual Proof
Before: Antigravity's terminal view, captured during the preceding continuation verification. Paths/account details are masked.
After: actual saved agy conversation in Chat UI, followed by a message sent through its composer and persisted by agy. Gray blocks redact private paths. Pane/session metadata was seeded because hooks were disabled in the isolated validation profile.
Tool rendering: cropped sanitized transcript fixture, not successful live model output. Shows the recorded tool-argument/result shape and subsequent assistant response.
Testing
pnpm tc, changed-code quality, commit hooks, and Electron/Vite build passed.Review
Live native Windows generation, hooks and Chat rendering pass; command-permission visibility and Allow/Deny status are verified with required follow-up #21776. Linux/WSL and paired-runtime Chat remain unverified. See latest verification above. The host-version boundary is tested with mocks. Follow-up
8bcb02cddefadds two direct-SSH regressions that failed before the host-readability gate; 80 related launch/availability tests, full typecheck, and changed-code quality pass. Direct SSH chat support itself remains unfinished. This PR remains draft; the scoped merge recommendation requires #21776 and does not claim live Linux/WSL or paired-runtime coverage.The UI probe initially injected an incomplete status fixture and triggered the error boundary; the malformed fixture was removed and the valid-metadata run succeeded. No diagnostic report was sent. This is not claimed as a production crash fix.
Agent skill upstream boundary
Checklist