Repository navigation
Antigravity: fix native subagent lifecycle, surface full-history native subagents, model switches, and collapsible plan cards - #1229
Merged
Tryanks merged 3 commits intoDec 5, 2026
Conversation
…ve subagents, model switches, and collapsible plan cards
- Plan cards no longer default to collapsed by testing for Antigravity and an "orchestrator" model name in the UI (Principle 4). Every plan opens expanded and collapses from its header; the test covers that contract. - The active-step query in the Antigravity record now propagates its errors like the last-step query does. A failed read had counted as "nothing running", which settled background tasks early. Fixtures use the real `status` column, which agy 1.5.25 writes. - A nested invoke_subagent whose child cannot be named, and nested spawns still open when a turn yields or the session closes, now end with a terminal status. Left open, they held their lead's process alive.
Owner
|
Review: I pushed 39b8341 to this branch with these fixes.
Accepted as is: |
file:///tmp/wt-two names no file path on Windows, so the ack carried no worktree and no SessionMoved was announced there. The test now uses a directory under its scratch dir, which every platform can round-trip.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fix Antigravity native subagent lifecycle, background tasks, retries, and exact binding
RUNNING = 6,GENERATING = 8) inantigravity::recordso background commands/timers and in-flight generations do not prematurely complete subagents or proactive turns, preventing false watchdog kills on waiting parent sessions.GENERIC RUNNINGtools as backgrounded items (ItemBackgrounded), settle them on<child>/task-<step>completion messages (parsingexit_code), reconcile silent/killed tasks against SQLiterunning_steps, and mapGENERIC ERRORtoItemStatus::Failed.invoke_subagentdirectly to theconversationIdandworkspaceUrisreturned in its ACP completion ack (WatcherCommand::SpawnBound), emitSessionMovedfor child worktrees, track nested subagents recursively, and decode truncated JSON tool arguments cleanly.ERROR_MESSAGEsteps, capture real error messages in failure summaries, and reactivate subagents when late wakeups/retries arrive (emittingItemUpdated(InProgress)before new child items).Agents::summary().Surface full-history native subagents independently of client timeline pagination
NativeSubagentStatusandSessionStatus::native_subagents(populated from the host's completesession.timeline, with compact bounded previews) and document it underUnreleasedincrates/protocol/src/lib.rs.Agents::ofto readstatus.native_subagentsfirst (deduplicating against loadedtimeline.entriesfor backwards compatibility and in-flight updates) and stably order running native subagents ahead of finished ones. Earlier or still-running native subagents no longer disappear when above the virtualized history window, and counts no longer jump while scrolling up.Surface Antigravity Orchestrator served-model switches and make plan cards collapsible
transcript.jsonl(ParentModelTailer) to emitAgentEvent::ServedModelwhen Antigravity switches models mid-session (e.g.gemini-pro-orchestrator-neon<->gemini-flash-worker-agy, stripping thought-level suffixes so plain sessions do not emit false switches), rendering Tcode's existing inlineModelChangeddivider.Plancards collapsible via their header (with a single-line preview subtitle when collapsed and an independent Copy button), defaulting to collapsed under Antigravity Orchestrator models unless awaiting a user decision.Verification
cargo fmt --all --checkmbx clippy --workspace --all-targets --locked -- -D warningsmbx test -p tcode-protocol --locked(12 passed)mbx test -p agent --locked antigravity(24 passed, including new unit tests forRecordState,ParentModelTailer, backgrounded subagent tasks,SpawnBound+ worktree + nested spawns, and transient retries/reactivation)mbx test -p tcode-runtime --locked mirrors(12 passed, includingrunning_native_subagent_holds_idle_reap_until_doneandsession_status_lists_all_native_subagents_from_full_history)mbx test -p tcode-ui --locked agents_panel(5 passed, includingnative_subagents_outside_loaded_history_window_stay_visible_and_do_not_duplicate)mbx test -p tcode-ui --locked plan_card_collapses(1 passed)mbx test -p tcode-ui --locked a_plan_is_decided(1 passed)