Skip to content

[Bug]: Antigravity 1.5.0+ fails text generation with 'Antigravity wrote files during text generation' #36169

Open

Description

@TheConnMan

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Use or update the managed or external Antigravity ACP runtime to version 1.5.0 (or newer).
  2. In Settings → Models → Text Generation, select Antigravity (e.g. gemini-3.8-flash).
  3. Start a new thread, or trigger thread title regeneration, commit message generation, or PR content generation.
  4. The title never generates and stays on the default.

Expected behavior

Text generation succeeds and returns the generated title or commit message without tripping the workspace hygiene guard.

Actual behavior

TextGeneration fails with:

TextGenerationError: Text generation failed in generateThreadTitle: Antigravity wrote files during text generation.

Impact

Major degradation or frequent failure

Version or commit

0.1.10-nightly.20261113.4630 (code path unchanged on main)

Environment

Linux x86_64, Antigravity ACP 1.5.0

Logs or stack traces

{"type":"effect-span","name":"TextGeneration.generateThreadTitle","exit":{"_tag":"Failure","cause":"TextGenerationError: Text generation failed in generateThreadTitle: Antigravity wrote files during text generation.\n    at AntigravityTextGeneration.runJson\n    at AntigravityTextGeneration.generateThreadTitle\n    at TextGeneration.generate\n    at TextGeneration.generateThreadTitle"}}

Root cause and suggested fix

In apps/server/src/provider/acp/AntigravityAcpSupport.ts:

function antigravityWritesRunWorkflowSkill(version: string | null | undefined): boolean {
  const parsed = parseAntigravityVersion(version);
  return (
    parsed !== undefined &&
    compareVersions(parsed, [1, 4, 2]) >= 0 &&
    compareVersions(parsed, [1, 4, 5]) <= 0
  );
}

The upper bound compareVersions(parsed, [1, 4, 5]) <= 0 assumes later releases stop creating skills/system/run-workflow/SKILL.md. Antigravity 1.5.0 still writes that file at startup unless run_workflow is disabled, so 1.5.0 no longer receives disabledTools: ["run_workflow"] in sessionMeta.

AntigravityTextGeneration.runJson runs in a scoped temp dir (t3-antigravity-text-*). The post-run guard hasOnlyRuntimeDirectories(cwd) only accepts .agents, .agents/skills, .gemini, and .gemini/skills, so the new skills/ directory is treated as a model write and the request is rejected.

Either drop the upper bound:

function antigravityWritesRunWorkflowSkill(version: string | null | undefined): boolean {
  const parsed = parseAntigravityVersion(version);
  return parsed !== undefined && compareVersions(parsed, [1, 4, 2]) >= 0;
}

or have the text-generation helper session always pass disabledTools: ["run_workflow"] regardless of version.

Related: #29876 (same guard, different cause: empty runtime skill directories on 1.4.1, fixed by #27191).

Workaround

Pin Antigravity ACP back to 1.4.5, or set the text generation model to another provider.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions