Skip to content

Starting a second Antigravity thread resumes and cancels another thread's in-flight turn #43012

Backlog

Description

@vivekkairi

What happened

An Antigravity thread was running a long turn: the model had issued a batch of ~19 edit_file calls and agy was executing them in order. While it was on the 16th, I started a new Antigravity thread on the same provider instance. Five seconds later the first thread failed with "Antigravity stopped this turn because of an error." The underlying agy error was:

agent executor error: expected pending tool step at index 211, got status CORTEX_STEP_STATUS_CANCELED

Sending "continue" recovered the thread, but the remaining edits from the batch were lost from the failed turn.

Diagnosis

T3 spawns one agy acp process per thread, and every process gets the same --gemini-dir <profile> and --app-data-dir antigravity-acp (apps/server/src/provider/antigravityAuthSupport.ts, spawn args around line 558). On startup, agy treats any conversation in that directory still marked as running as "interrupted by server restart" and resumes it, even when another live agy process owns it.

From the new thread's agy log (18:43:12.664):

server.go:5311] Resuming 1 conversation(s) interrupted by server restart

The original conversation's trajectory DB then shows:

  • steps 195–210 (edit_file): status 3 (done)
  • steps 211–213 (2× edit_file, 1× run_command), queued at 18:42:18: status 6 (CANCELED), never executed
  • step 214: error step with the executor error above, 18:43:17
  • step 215: a planner response inside the same conversation, created 18:43:12, finished 18:44:08. This is the resumed turn driven by the second process, invisible to T3. It spans almost exactly the new thread's first turn (18:43:13.8–18:44:14.9).

T3 sent no session/cancel; the provider event log shows only the one session/prompt, which returned end_turn at 18:43:17.105. AntigravityTurnOutcome classifies the error as a generic provider_error, since it doesn't match the API_ERROR patterns.

The same happens on any agy startup: the process started for "continue" at 18:43:46 logged "Resuming 2 conversation(s) interrupted by server restart", which would include the second thread's conversation, still running at the time.

Steps to reproduce

(Reconstructed from logs; not re-run deliberately.)

  1. Antigravity provider, full-access runtime mode.
  2. Thread A: give a task that makes the model issue a batch of parallel tool calls (e.g. "add t.Parallel() to every test in these 20 files"), so several tool steps are queued.
  3. While Thread A is executing the batch, create Thread B on the same Antigravity instance and send any message.
  4. Thread B's agy log shows "Resuming 1 conversation(s) interrupted by server restart"; Thread A's queued tool steps become CORTEX_STEP_STATUS_CANCELED and its turn fails with "expected pending tool step at index N".

Version

Server (where the bug happened): 0.1.12-nightly.20261124.5178 (remote, linked environment)
Antigravity CLI: 1.5.17
Client used to open triage: T3 Code Desktop 0.1.12-nightly.20261120.5009 (macOS). Triage CLI version is that client's.

Environment

Remote T3 server on Linux x64 (cloud VM), accessed from T3 Code Desktop on macOS via a linked environment. Antigravity authenticated with a Gemini API key, model gemini-4-neon, full-access runtime mode.

Evidence

  • providers/antigravity/<instance>/antigravity-acp/log/acp-server-…_184312-*.log: "Resuming 1 conversation(s) interrupted by server restart" at 18:43:12.664, one second after the new thread's agy process spawned.
  • …_180116-*.log (Thread A's process): tool confirmation for step 210 at 18:43:17.021, then "agent executor error: expected pending tool step at index 211, got status CORTEX_STEP_STATUS_CANCELED" at 18:43:17.101.
  • …_184346-*.log (process for "continue"): "Resuming 2 conversation(s) interrupted by server restart".
  • conversations/<session>.db step table as summarized under Diagnosis.
  • logs/provider/events.<thread>.log: no session/cancel; session/prompt started 18:01:17.544, succeeded 18:43:17.105.

Related issues

#42581: same root cause (one agy process per thread sharing --app-data-dir), different symptom (OAuth MCP token rotation).

Workaround

Don't start, reopen, or send to another Antigravity thread while one is mid-turn on the same instance. Untested: putting concurrent work on separate Antigravity provider instances, which get separate profile directories.

Agent

Triaged with Claude Code (Claude Opus 5.5) running inside T3 Code.

Activity

  1. added
    via-triage
    on Nov 25, 2026
  2. justcarlson commented on Nov 25, 2026

    @justcarlson

    Note

    🤖 Gemini 4 Neon responding on behalf of justcarlson

    Field data supporting the shared --app-data-dir diagnosis:

    On v0.1.12-nightly.20261123.5151 pinned to managed agy 1.5.13, we audited 361 acp-server-*.log files with concurrent Antigravity threads sharing --app-data-dir antigravity-acp and saw 0 CORTEX_STEP_STATUS_CANCELED collisions. We are holding managed agy at 1.5.13 rather than updating to 1.5.17 until this is resolved.

    Suggested direction (judgment, not tested): give each spawned agy acp process its own session state directory (for example antigravity-acp/<sessionId>) while keeping auth/profile state shared if needed, so a newly started ACP process cannot recover or cancel a live sibling's in-flight conversation.

  3. added a commit that references this issue on Nov 26, 2026
    3dc670b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions