Skip to content

fix(setup): Empty Antigravity responses and profile cross-talk - #84

Merged
4ndreello merged 4 commits into
mainfrom
fix/agy-empty-profile-swap
Sep 15, 2026
Merged

4ndreello merged 4 commits into
mainfrom
fix/agy-empty-profile-swap

Conversation

@4ndreello

Copy link
Copy Markdown
Owner

Two independent fixes from one autonomous run.

Antigravity sessions that streamed their answer and ended with an empty result.response surfaced as a blank string: the parser skipped the message event and still emitted session.completed. The parser now accumulates text deltas per session, reconstructs the message from them, and emits session.failed when nothing usable arrived. Lifecycle resets on start/stop/attach plus bounded replay of consumed output keep daemon restarts from misclassifying runs.

Separately, profile save snapshotted the active profile into any target name, and setup --profile for a new name inherited root agents as atual while blanking the sandbox/autocompact screens. New profiles now start from the base setup with an empty agent map, save resolves the explicit target, and the role pin respects the configured defaultAgent.

Alternative for the empty result was keeping session.completed with an empty message; rejected because a ghost completion lets agents proceed on missing work while a failure costs one retry (matches the terminal synthesis contract).

Reviewers need care around src/drivers/antigravity/driver.ts replay bounds and the parser accumulator cap. Verified with 172 scoped tests green, tsc clean, diff-check clean, and a bounded mutation probe with 2 kills and 0 survivors. Follow-ups: possible extra polish landing from the still-open fix session e80c, no live agy turn was ever spent, and nested --role reviewer runs unexpectedly resolved to the root Claude binding instead of the low-cost Antigravity one.

profile save <name> snapshotted the active profile instead of the target, and setup --profile for a new name inherited root agents as atual while blanking sandbox/autocompact screens. New profiles now start from base with an empty agent map, save resolves the explicit target, and the role pin respects loaded.defaultAgent.
A successful result with an empty response skipped the message event and still emitted session.completed, surfacing as an empty string. The parser now accumulates text deltas per session and falls back to them, emits session.failed when nothing usable arrived, and resets state on start/stop/attach with bounded replay of consumed output on reattach.
Extract resultLine and deltaLine helpers for the repeated stream-json fixtures. No behavior change; same 43 tests, 75 fewer lines.
Merge the empty/whitespace failure cases into it.each and share a contentAfterEmptyResult helper between the replay tests.
@sonarqubecloud

Copy link
Copy Markdown

@4ndreello
4ndreello marked this pull request as ready for review September 15, 2026 12:51
@4ndreello
4ndreello merged commit ba05b32 into main Sep 15, 2026
4 checks passed
@4ndreello
4ndreello deleted the fix/agy-empty-profile-swap branch September 15, 2026 12:52
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