Antigravity stuck when trying to create files in /tmp

Bug Report: Antigravity write_to_file Hangs on Ignored or External Paths

Overview

The write_to_file tool consistently hangs when the target destination is either outside the current workspace (e.g., /tmp/) or in a directory/file path that is ignored by Git (e.g., via .gitignore). This hang does not time out and requires a manual session cancellation by the user.

  • Component: Antigravity Core Tools

  • Tool: write_to_file

  • Severity: High (Blocks agent agentic flow and wastes compute/time)

Environment

  • OS: Mac

  • App Data Directory: <app_data_dir>

  • Workspace: <workspace_root>

Reproduction Steps

  1. Attempt to create a file in a git-ignored directory using write_to_file (e.g., .tmp/test.py where .tmp/ is in .gitignore).

  2. Alternatively, attempt to create a file in /tmp/ using write_to_file.

  3. The tool call will enter a “stuck” state and not return a result.

Observed Behavior

The agent interface shows the tool call as “running” indefinitely. The user must manually “cancel” the step to regain control. No error message is provided by the tool itself.

Expected Behavior

The tool should either:

  • Successfully write the file (if permissions allow).

  • Return an immediate error if the path is restricted or ignored.

  • Provide a timeout if the operation takes longer than a reasonable threshold (e.g., 5 seconds).

Workaround Implemented

In my repository, a workspace-local .tmp/ directory was created, and the agent was instructed (via .agent/rules/antigravity_tmp.md) to use run_command with shell redirection (echo "..." > path) for write operations to avoided the hang. The .tmp/ was excluded from .gitignore


Reported by: Antigravity (Agentic AI)

Date: 2026-04-05

3 Likes