@devries-cameron20 / t3code-1 / commits / f5372d27da
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(antigravity): reject unsupported manual compaction (#22217)

Co-authored-by: maria-rcks <maria@kuuro.net>

Arham Mahajan committed Oct 31, 2026 at 02:08 UTC f5372d27da5100dabde38e95992f647813d5f9bd
3 files changed +48 -1
apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts
+43
@@ -128,6 +128,49 @@ const layerSession = Layer.mergeAll(
128 TestProviderHost.layer().pipe(Layer.provide(NodeServices.layer)),
129 );
130
131 +describe("AntigravityAdapterV2 compaction", () => {
132 + it.effect("does not expose unsupported manual compaction on the provider session", () =>
133 + Effect.gen(function* () {
134 + const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
135 + const path = yield* Path.Path;
136 + const crypto = yield* Crypto.Crypto;
137 + const mockAgentPath = yield* path.fromFileUrl(
138 + new URL("../../../scripts/acp-mock-agent.ts", import.meta.url),
139 + );
140 + const instanceId = ProviderInstanceId.make("antigravity-compaction-test");
141 + const adapter = yield* makeAntigravityAdapterV2({
142 + instanceId,
143 + selfInvocation: yield* resolveSelfInvocation(),
144 + makeRuntime: (input) =>
145 + makeAntigravityAcpRuntime({
146 + ...input,
147 + childProcessSpawner,
148 + spawn: {
149 + command: process.execPath,
150 + args: [mockAgentPath],
151 + cwd: input.cwd,
152 + env: { T3_ACP_ANTIGRAVITY: "1" },
153 + },
154 + }).pipe(Effect.provideService(Crypto.Crypto, crypto)),
155 + withProcess: (_stop, task) => task,
156 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
157 + defaultModel: Effect.succeed(undefined),
158 + });
159 + const session = yield* adapter.openSession({
160 + threadId: ThreadId.make("thread-antigravity-compaction"),
161 + providerSessionId: ProviderSessionId.make("provider-session-antigravity-compaction"),
162 + modelSelection: { instanceId, model: "gemini-test-low" },
163 + runtimePolicy: ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
164 + runtimeMode: "full-access",
165 + interactionMode: "default",
166 + cwd: process.cwd(),
167 + }),
168 + });
169 + assert.isUndefined(session.compactThread);
170 + }).pipe(Effect.provide(layerSession), Effect.scoped),
171 + );
172 +});
173 +
174 describe("AntigravityAdapterV2 session open", () => {
175 it.effect.each([
176 {
apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts
+2 -1
@@ -238,7 +238,8 @@ export function makeAntigravityAcpAdapterFlavor(
238 normalizeToolCall: normalizeAntigravityToolCall,
239 extractSubagentUpdate: extractAntigravitySubagentUpdate,
240 supportsImagePrompts: true,
241 - supportsCompaction: true,
241 + // ACP 1.3.0 treats /compact as ordinary model input.
242 + supportsCompaction: false,
243 requiresSignIn: isAntigravitySignInRequiredError,
244 };
245 }
docs/user/providers-antigravity.md
+3
@@ -87,6 +87,9 @@ T3 Code keeps conversation history and file diffs, but Antigravity cannot rewind
87 its conversation. Reverting a thread or editing and resubmitting an earlier turn
88 is unavailable. Continue with a follow-up message or start a new thread.
89
90 +Manual context compaction is unavailable through Antigravity's ACP runtime, even
91 +though its CLI has `/compact`. Start a new thread when you need a fresh context.
92 +
93 ### Skills and attachments
94
95 Put project skills in `.agents/skills`. T3 Code also reads `.gemini/skills` and the