You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(antigravity): show active subagents, swarm workers, model, and live tools in sidebar - #43695
When Antigravity (agy) spawns subagents or a Swarm of parallel workers, Orca now shows the coordinator's model and an active +N badge just like Codex — and expanding the row lists each currently running worker or subagent with its name/role, model, and live tool (read_file, run_command, etc.), while automatically hiding sleeping (wake_mode: "mentions") and finished helpers.
What Changed
Shared live child tool preview (AgentSubagentSnapshot): Added optional toolName and toolInput fields to AgentSubagentSnapshot (normalized with AGENT_STATUS_TOOL_NAME_MAX_LENGTH = 60 / AGENT_STATUS_TOOL_INPUT_MAX_LENGTH = 160, included in subagentRosterDigest for relay change detection and agentSubagentsEqual), and wired them into buildLegacyAgentChildRowModels as operation details rendered by DashboardAgentRow.
Antigravity brain metadata & active-only roster:
Added bounded readers in src/shared/agent-hook-listener/providers/antigravity/antigravity-brain-metadata.ts reusing Orca's existing bounded file/transcript helpers (readNodeFileSyncWithinLimit, readTranscriptDirectory, readFirstTranscriptRecord, readLastTextFromTranscriptOnce) to classify root (USER_EXPLICIT/USER_INPUT) vs child (SYSTEM/SYSTEM_MESSAGE) transcripts, extract non-"auto" models from PLANNER_RESPONSE, inspect <brainDir>/.system_generated/swarm/members.json and .system_generated/subagents/*.json, and check child transcript tails (step_index settlement & pending tool_calls).
Added antigravity-pane-state.ts and antigravity-subagent-roster.ts to track per-child hook state (model, toolName, toolInput, ask_question/ask_permission waits) and reconcile active-only snapshots (excluding killed workers, parked wake_mode: "mentions" board workers, and completed SUBAGENT_STATE_ALIVE subagent turns).
Updated antigravity-events.ts, provider-dispatch.ts, and pane-provider-session.ts so in-session child hooks update the folded parent row without clobbering parent prompt, tool, model, providerSession, or host turn-end timing, while cold post-restart child hooks remain isolated (providerSession: undefined).
Added antigravity-transcript-poll.ts and wired it into transcript-poll-policy.ts, AgentHookServerStatusRetries (main server), and AgentHookResultRetryScheduler (WSL/SSH relay) so swarm worker wake/sleep transitions and live tools update on a 1s cadence between coordinator hooks.
Tests & Component Fixtures: Added integration coverage in server-antigravity-subagents-swarm.test.ts and Antigravity swarm/subagent fixtures in WorktreeCardSubagents.fixture.tsx.
Why
Previously, child agy conversations sharing ORCA_PANE_KEY either had their hooks dropped, lacked statusAdmissionSession mapping for active root sessions, omitted modelName, ignored swarm/swarm_wait lifecycle metadata on disk, and only checked invoke_subagent/send_message. Polling Antigravity's .system_generated/{swarm,subagents} metadata alongside child hook reconciliation brings parity with Codex without breaking existing cold-child resume isolation or background run_command monitoring holds.
Rendered via WorktreeCardSubagents component fixtures (UI visual representation of the new Antigravity Swarm / Subagents status payload):
Before
After (Collapsed)
After (Expanded)
Testing
Ran locally on Linux / WSL2 with Node:
pnpm test src/shared/agent-status/ src/shared/agent-hook-listener/ src/main/agent-hooks/server/testing/providers/antigravity/ --maxWorkers=2 → 40 test files passed, 167 tests passed (scoped instead of repo-wide vitest related fan-out caused by touching agent-status-types.ts, per AGENTS.md).
pnpm test src/wsl-guest/agent-hooks/ src/renderer/src/components/sidebar/workspace-card/activity/ src/main/agent-hooks/server/testing/presence/server-idle-process-owner.test.ts --maxWorkers=2 → passed (AgentHookResultRetryScheduler, sidebar row projection, and Antigravity/idle owner tests).
pnpm tc → passed across all TypeScript projects (tsconfig.node.json, tsconfig.tc.web.json, tsconfig.tc.cli.json).
pnpm check:changed --maxWorkers=2 → 37/38 checks passed (changed-code quality, format, oxlint, all ratchets including main-sync-fs-ratchet and max-lines-ratchet, import boundaries, localization, react-compiler-compat); only unit tests (vitest related) was superseded by the scoped Vitest runs above due to agent-status-types.ts fan-out.
Headless fixture visual verification via fixtures-shot.mjs (antigravityBefore, antigravitySwarmCollapsed, antigravitySwarmExpanded).
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Level: Low
What could break: Antigravity hook admission or idle-stop timing if a provider/version changes transcript origin markers (USER_EXPLICIT/SYSTEM), swarm/members.json structure, or subagents/*.json fields.
Safeguards & boundaries: Existing cold-child resume tests (server-antigravity-resume-identity.test.ts), idle process owner tests, and background command hold tests (server-antigravity-background-command-hold.test.ts) continue to pass unchanged; new readers use bounded sync I/O (256KB cap), guard against path traversal on childConversationId, stop 1s polling immediately once the parent row settles to done, and keep AgentSubagentSnapshot.toolName/toolInput optional for backwards wire compatibility with older relays and mobile clients.
Revert: A clean revert of this single commit restores prior Antigravity hook handling with no schema migrations or persisted settings impact.
AI Disclosure
Assisted by Google Gemini (via Antigravity CLI), with human review and local test/lint/fixture verification.
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Handles / and \ path separators for Linux, macOS, and Windows brain/transcript paths.
Local (AgentHookServer) and remote WSL/SSH (AgentHookResultRetryScheduler) servers share the exact same Antigravity reconciliation and polling logic.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Antigravity status handling now reads brain metadata and child transcripts to track subagents and swarm workers. It folds child activity, including waiting and tool details, into the parent status and polls active sessions. Subagent snapshots carry tool names and input previews through status comparison and presentation. Tests cover swarm and child-session lifecycle behavior, and fixtures show Antigravity parent and worker rows.
Severity of issue fixed: Medium
Merge Risk: Moderate · up to fd2e4
Antigravity sidebar status can go stale or miss a newly spawned helper in specific sequences, for example when an earlier helper ends or a background command finishes while a new helper is still starting. The effect is limited to the Antigravity status display and can recover on a later event. Fix the discovery-hold handling before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Antigravity sidebar support for active subagents, swarm workers, model, and live tools. It matches the summarized changeset, which adds Antigravity child tracking, ros…
Description check
The description follows the repository template and covers ELI5, What Changed, Why, Linked Issue (Fixes #43692), Visual Proof with before/after images, Testing with commands and results, Risk with lev…
Linked Issues check
Linked issue #43692 has coding requirements only. The whole-PR summary (merge base bb2621a to head fd2e459) covers each requirement: 1. Model: normalizeAntigravityModel and `readAntigravityTranscrip…
Out of Scope Changes check
Each changed area maps to an objective of #43692 or supports one: - Antigravity brain metadata, pane state, roster, event rules, events, and transcript poll modules implement model, helper-tool, child…
Full details: Title check
Explanation
The title names the main change: Antigravity sidebar support for active subagents, swarm workers, model, and live tools. It matches the summarized changeset, which adds Antigravity child tracking, roster reconciliation, model retention, tool fields on subagent snapshots, and fixtures. The title is long at 89 characters, but it stays specific and on-topic.
Full details: Description check
Explanation
The description follows the repository template and covers ELI5, What Changed, Why, Linked Issue (Fixes #43692), Visual Proof with before/after images, Testing with commands and results, Risk with level Low and a revert path, AI Disclosure, and the upstream boundary checkbox. The Testing and Visual Proof sections are detailed. The Risk section is clear. Minor gaps: the Visual Proof before/after images are hosted externally and cannot be verified from the diff, and the template's 'Level' wording is filled in. The description is mostly complete.
Full details: Linked Issues check
Explanation
Linked issue #43692 has coding requirements only. The whole-PR summary (merge base bb2621a to head fd2e459) covers each requirement:
Model: normalizeAntigravityModel and readAntigravityTranscriptModel read non-"auto" models from hook payloads and PLANNER_RESPONSE. retainHookRootContext in pane-provider-session.ts keeps the prior Antigravity model.
Child hook admission: isAntigravityInSessionChildHook and the statusAdmissionSession mapping fold in-session child hooks into the parent row. Cold child hooks stay isolated.
Brain metadata: antigravity-brain-metadata.ts reads .system_generated/swarm/members.json and .system_generated/subagents/*.json. antigravity-subagent-roster.ts builds active-only snapshots and excludes killed, parked wake_mode: "mentions", and settled entries.
Waiting: child ask_question and ask_permission waits set the child to waiting. The parent folds this into its state.
Tool preview: AgentSubagentSnapshot gains optional toolName and toolInput. These pass through buildLegacyAgentChildRowModels, subagentRosterDigest, and agentSubagentsEqual.
Polling: antigravity-transcript-poll.ts is wired into transcript-poll-policy.ts, server-status-retries.ts (local), and agent-hook-result-retry-scheduler.ts (WSL/SSH). Polling stops when the parent reaches done.
Tests: server-antigravity-subagents-swarm.test.ts covers swarm polling, wake-mode filtering, parent-state preservation, child ask_question, and completion retirement. Fixtures cover collapsed and expanded views.
Changes since the previous review (9ff7f5b to fd2e459) add poll caching (unchangedWhen in node-bounded-file-reader.ts) and worker sleep and model fixes. These support the 1s polling and model requirements. Uncertainty: I did not read source hunks or rerun tests. This verdict relies on the whole-PR summary and the test results stated in the PR description.
Full details: Out of Scope Changes check
Explanation
Each changed area maps to an objective of #43692 or supports one:
Shared contract changes (AgentSubagentSnapshot fields, length constants, digest, and equality) carry tool previews to the UI and detect relay changes.
node-bounded-file-reader.ts (unchangedWhen) supports the poll caching that the 1s polling requires.
Retry scheduler and server retry changes wire polling into the local and WSL/SSH paths.
listener-state.ts type changes follow from the new AntigravityPaneChildState type.
The fixture file and integration tests support the UI and behavior requirements.
No unrelated feature or refactor appears in the summary. Conclusions rely on the summary, not on direct diff reads.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Quick win
Retain pane state while helper discovery is pending.
If a background run_command finishes before a spawned helper appears, its PostToolUse can set preservesDoneLead=true. With no discovered subagents or remaining commands, this condition deletes the pane state even though awaitingInitialHelperDiscovery still makes the emitted payload working.
The next poll has no pane state and cannot discover the helper. Require the folded payload to be done, or also require no pending discovery, before cleanup. Keep cleanup for command completion when no discovery hold remains.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Heavy lift
Do not treat an existing helper as discovery of a new helper.
If helper A is already tracked, spawning helper B sets awaitingInitialHelperDiscovery, but this check immediately clears it because A exists. If the root then stops with fullyIdle=false and A is killed before B appears in metadata, the next poll emits done and deletes the pane state. B is no longer discovered by polling.
Track discovery relative to the pending spawn. Clear the hold when a new helper is observed, not when any old child exists. Apply the same distinction to the reset in recordAntigravityChildHook.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
When Antigravity (
agy) spawns subagents or a Swarm of parallel workers, Orca now shows the coordinator's model and an active+Nbadge just like Codex — and expanding the row lists each currently running worker or subagent with its name/role, model, and live tool (read_file,run_command, etc.), while automatically hiding sleeping (wake_mode: "mentions") and finished helpers.What Changed
AgentSubagentSnapshot): Added optionaltoolNameandtoolInputfields toAgentSubagentSnapshot(normalized withAGENT_STATUS_TOOL_NAME_MAX_LENGTH = 60/AGENT_STATUS_TOOL_INPUT_MAX_LENGTH = 160, included insubagentRosterDigestfor relay change detection andagentSubagentsEqual), and wired them intobuildLegacyAgentChildRowModelsasoperationdetails rendered byDashboardAgentRow.src/shared/agent-hook-listener/providers/antigravity/antigravity-brain-metadata.tsreusing Orca's existing bounded file/transcript helpers (readNodeFileSyncWithinLimit,readTranscriptDirectory,readFirstTranscriptRecord,readLastTextFromTranscriptOnce) to classify root (USER_EXPLICIT/USER_INPUT) vs child (SYSTEM/SYSTEM_MESSAGE) transcripts, extract non-"auto"models fromPLANNER_RESPONSE, inspect<brainDir>/.system_generated/swarm/members.jsonand.system_generated/subagents/*.json, and check child transcript tails (step_indexsettlement & pendingtool_calls).antigravity-pane-state.tsandantigravity-subagent-roster.tsto track per-child hook state (model,toolName,toolInput,ask_question/ask_permissionwaits) and reconcile active-only snapshots (excluding killed workers, parkedwake_mode: "mentions"board workers, and completedSUBAGENT_STATE_ALIVEsubagent turns).antigravity-event-rules.ts(invoke_subagent,send_message,manage_subagents,swarm,swarm_wait,read_board,run_workflow).antigravity-events.ts,provider-dispatch.ts, andpane-provider-session.tsso in-session child hooks update the folded parent row without clobbering parent prompt, tool, model,providerSession, or host turn-end timing, while cold post-restart child hooks remain isolated (providerSession: undefined).antigravity-transcript-poll.tsand wired it intotranscript-poll-policy.ts,AgentHookServerStatusRetries(main server), andAgentHookResultRetryScheduler(WSL/SSH relay) so swarm worker wake/sleep transitions and live tools update on a 1s cadence between coordinator hooks.server-antigravity-subagents-swarm.test.tsand Antigravity swarm/subagent fixtures inWorktreeCardSubagents.fixture.tsx.Why
Previously, child
agyconversations sharingORCA_PANE_KEYeither had their hooks dropped, lackedstatusAdmissionSessionmapping for active root sessions, omittedmodelName, ignoredswarm/swarm_waitlifecycle metadata on disk, and only checkedinvoke_subagent/send_message. Polling Antigravity's.system_generated/{swarm,subagents}metadata alongside child hook reconciliation brings parity with Codex without breaking existing cold-child resume isolation or backgroundrun_commandmonitoring holds.Linked Issue
Fixes #43692
Visual Proof
Rendered via
WorktreeCardSubagentscomponent fixtures (UI visual representation of the new Antigravity Swarm / Subagents status payload):Testing
Ran locally on Linux / WSL2 with Node:
pnpm test src/shared/agent-status/ src/shared/agent-hook-listener/ src/main/agent-hooks/server/testing/providers/antigravity/ --maxWorkers=2→ 40 test files passed, 167 tests passed (scoped instead of repo-widevitest relatedfan-out caused by touchingagent-status-types.ts, perAGENTS.md).pnpm test src/wsl-guest/agent-hooks/ src/renderer/src/components/sidebar/workspace-card/activity/ src/main/agent-hooks/server/testing/presence/server-idle-process-owner.test.ts --maxWorkers=2→ passed (AgentHookResultRetryScheduler, sidebar row projection, and Antigravity/idle owner tests).pnpm tc→ passed across all TypeScript projects (tsconfig.node.json,tsconfig.tc.web.json,tsconfig.tc.cli.json).pnpm check:changed --maxWorkers=2→ 37/38 checks passed (changed-code quality,format,oxlint, all ratchets includingmain-sync-fs-ratchetandmax-lines-ratchet,import boundaries,localization,react-compiler-compat); onlyunit tests(vitest related) was superseded by the scoped Vitest runs above due toagent-status-types.tsfan-out.Headless fixture visual verification via
fixtures-shot.mjs(antigravityBefore,antigravitySwarmCollapsed,antigravitySwarmExpanded).I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Level: Low
USER_EXPLICIT/SYSTEM),swarm/members.jsonstructure, orsubagents/*.jsonfields.server-antigravity-resume-identity.test.ts), idle process owner tests, and background command hold tests (server-antigravity-background-command-hold.test.ts) continue to pass unchanged; new readers use bounded sync I/O (256KBcap), guard against path traversal onchildConversationId, stop 1s polling immediately once the parent row settles todone, and keepAgentSubagentSnapshot.toolName/toolInputoptional for backwards wire compatibility with older relays and mobile clients.AI Disclosure
Assisted by Google Gemini (via Antigravity CLI), with human review and local test/lint/fixture verification.
Review
Agent skill upstream boundary
Notes
/and\path separators for Linux, macOS, and Windows brain/transcript paths.AgentHookServer) and remote WSL/SSH (AgentHookResultRetryScheduler) servers share the exact same Antigravity reconciliation and polling logic.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)