Repository navigation
Description
What happened
After forking a 21-run Antigravity thread, I sent /compact as the first message in the forked thread. Instead of compacting the forked conversation (or telling me compaction isn't applicable yet), the assistant replied that there was no earlier conversation history in the thread to compact. On the next message ("This is literally a forked conversation though."), the fork's Context handoff (full_thread_summary) finally arrived and the assistant had the forked context.
Diagnosis
Investigated local statev2.sqlite projections, logs/provider/events.<threadId>.log, and pingdotgg/t3code server source:
-
Fork creates a
portable_contexthandoff pending delivery on Run 1.orchestration_v2_projection_context_transfersrecorded the fork withresolution.strategy = "portable_context", attaching afull_thread_summarycontextHandoffIdtorun:ordinal:1(createdAt: 2026-11-27T15:08:32.193Z).- Antigravity ACP does not implement
session.injectHistory, so handoffs must be delivered inline with a prompt.
-
Sending
/compacton Run 1 defers both the context handoff and T3 prompt instructions.apps/server/src/orchestration-v2/ProviderTurnStartService.ts(L1281) marks/compactviaisSlashCommandMessage(providerMessage)(ContextHandoffDelivery.tsL16–22).ProviderTurnStartService.ts(L2410–2412) callsdeliverContextHandoffs({ ..., deferInline: compact || slashCommand }).- In
apps/server/src/orchestration-v2/ContextHandoffDelivery.ts(L48–49),deferInline && input.inject === undefinedreturns{ context: "" }and leaves the handoff pending. ProviderTurnStartService.ts(L2462) forwards rawuserText("/compact").packages/provider-acp/src/server/adapter.ts(L10080, L10113–10116) andpackages/provider-core/src/server/orchestrationInstructions.ts(L92) also skip<t3_code_instructions>and<runtime_info>wheneverprompt.trimStart().startsWith("/").
-
Fresh Antigravity ACP session receives bare
/compactas an ordinary user prompt.apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts(L312) setscompactViaAdvertisedCommand: true, enablingcompactThread(packages/provider-acp/src/server/adapter.tsL2833, L11324–11334), which callsstartTurnwith text"/compact".- On Run 1, the provider log shows
initialize→authenticate→session/new→session/prompt(15:08:34.652Z). Because the new native session has 0 prior turns, no inline handoff, and Antigravity ACP does not intercept/compactinsession/prompton this fresh session, the model receives bare/compactin an empty conversation and tells the user there is no history to compact.
-
Turn 2 delivers the deferred handoff.
- On Run 2 (a normal text message at
15:09:18.272Z),deferInlineisfalse, so thecontextHandofffinally transitions (updatedAt: 2026-11-27T15:09:18.272Z) and<t3_code_instructions>,<runtime_info>, andContext handoff (full_thread_summary)are injected for the first time.
- On Run 2 (a normal text message at
Expected behavior:
- Sending
/compacton a freshly forked thread whose context exists only as an undeliveredportable_contexthandoff (with 0 native turns on the new provider session) should not spawn an empty session and pass raw/compactto the LLM without context. - Ideally T3 Code either rejects/no-ops
/compactbefore any native turns exist (noting the fork already starts from a handoff summary), or for ACP providers withcompactViaAdvertisedCommand: true, verifies thatcompactis actually an advertised/supported command on the active session before treating/compactas a native slash command and stripping handoffs/instructions.
Steps to reproduce
- Have a multi-turn thread running on the Antigravity (ACP) provider.
- Fork the thread from the latest completed run.
- In the newly forked thread, send
/compactas the first message. - Observe the assistant responding as if it is a brand-new empty conversation with no history.
- Send any regular follow-up message in turn 2 and observe the
Context handoff (full_thread_summary)and T3 instructions now being delivered.
Version
0.1.12
Environment
macOS 27.2 (26B5112a, arm64), Node v26.7.0, T3 Code v0.1.12 (desktop/web), Antigravity ACP (gemini-4-neon)
Evidence
# Provider native log (logs/provider/events.<fork-thread-id>.log)
[2026-11-27T15:08:32.358Z] initialize (started) -> succeeded (15:08:32.660Z)
[2026-11-27T15:08:32.660Z] authenticate (started) -> succeeded (15:08:34.460Z)
[2026-11-27T15:08:34.461Z] session/new (started) -> succeeded (15:08:34.634Z)
[2026-11-27T15:08:34.652Z] session/prompt (started) -> succeeded (15:08:40.239Z) # Run 1: "/compact" (no handoff, no instructions)
[2026-11-27T15:09:18.272Z] session/prompt (started) -> succeeded (15:09:44.032Z) # Run 2: regular message (handoff + instructions delivered)
# statev2.sqlite (orchestration_v2_projection_runs & orchestration_v2_projection_context_handoffs)
Run 1: requestedAt=2026-11-27T15:08:32.193Z, startedAt=2026-11-27T15:08:34.644Z, completedAt=2026-11-27T15:08:40.258Z, contextHandoffId=<handoff-id>
Run 2: requestedAt=2026-11-27T15:09:18.225Z, startedAt=2026-11-27T15:09:18.243Z, completedAt=2026-11-27T15:09:44.051Z, contextHandoffId=null
Context transfer (fork): status=consumed, resolution.strategy=portable_context, createdAt=2026-11-27T15:08:22.636Z, consumedAt=2026-11-27T15:08:32.193Z
Context handoff (<handoff-id>): strategy=full_thread_summary, createdAt=2026-11-27T15:08:32.193Z, updatedAt=2026-11-27T15:09:18.272Z
# Note updatedAt on the handoff matches Run 2's session/prompt timestamp (15:09:18.272Z), confirming delivery was deferred across Run 1.
Related issues
- [Bug]: Codex /compact fails instantly when a resumed turn starts before the compaction turn #18833 (Codex
/compactrace with resumed turns — different provider & failure mode) - [Bug]: Compact idle threads "Never" triggers compaction #26799 / Idle compaction is skipped when the server restarts, including for a desktop update, during the wait #27915 (idle compaction — unrelated to forked
portable_contexthandoff deferral) - [Bug]: Antigravity: a failed context-summarization checkpoint permanently bricks the thread #30414 (Antigravity context-summarization checkpoint failure — unrelated to first-turn
/compacton a fork)
Fix applied or workaround
Workaround: Send a normal message first (no /compact needed on a freshly forked thread since portable_context already boots the new native session from a condensed full_thread_summary handoff).
Filed by
Antigravity (gemini-4-neon) via manual local triage (T3 Code v0.1.12)
Activity