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

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

fix(server): an empty Antigravity MCP config still allows text generation (#36496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Alex Southwell committed Nov 15, 2026 at 19:02 UTC 96188376948545593a50c3a42d1aaebf9e7c7a97
2 files changed +13 -6
apps/server/src/textGeneration/AntigravityTextGeneration.test.ts
+1
@@ -549,6 +549,7 @@ it.layer(NodeServices.layer)("AntigravityTextGeneration", (it) => {
549 { name: "hooks.json", value: "{}", available: true },
550 { name: "hooks.json", value: '{"hooks":{}}', available: true },
551 { name: "mcp_config.json", value: '{"mcpServers":{}}', available: true },
552 + { name: "mcp_config.json", value: "", available: true },
553 ])("checks $name before starting a helper, available=$available", ({ name, value, available }) =>
554 Effect.gen(function* () {
555 const fixture = yield* makeFixture();
apps/server/src/textGeneration/AntigravityTextGeneration.ts
+12 -6
@@ -79,14 +79,20 @@ export const isAntigravityTextGenerationAvailable = Effect.fn(
79 if (info.type !== "File" || info.size > 64_000n) {
80 return false;
81 }
82 + // CLI 1.5.8 writes a 0-byte mcp_config.json before any server exists.
83 const empty = yield* fs.readFileString(configurationPath).pipe(
83 - Effect.flatMap(decodeConfiguration),
84 - Effect.flatMap((configuration) =>
85 - decodeConfigurationObject(
86 - configuration[name === "hooks.json" ? "hooks" : "mcpServers"] ?? configuration,
87 - ),
84 + Effect.flatMap((text) =>
85 + text.trim().length === 0
86 + ? Effect.succeed(true)
87 + : decodeConfiguration(text).pipe(
88 + Effect.flatMap((configuration) =>
89 + decodeConfigurationObject(
90 + configuration[name === "hooks.json" ? "hooks" : "mcpServers"] ?? configuration,
91 + ),
92 + ),
93 + Effect.map((configuration) => Object.keys(configuration).length === 0),
94 + ),
95 ),
89 - Effect.map((configuration) => Object.keys(configuration).length === 0),
96 Effect.orElseSucceed(() => false),
97 );
98 if (!empty) return false;