Skip to content

[Bug]: Antigravity passes a temporary session directory to macOS apps that outlive the session #45949

Done

Description

@Popcornnnnnnnn

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. Quit CC Switch on macOS.
  2. In a T3 Code thread using the built-in Antigravity provider, ask the agent to run /usr/bin/open -a "CC Switch".
  3. Let the Antigravity session end so T3 removes its antigravity-tmp/<instance>/run-<id> directory. Keep CC Switch running.
  4. In CC Switch, download an available update and choose Install and restart.

Expected behavior

An app launched from the agent shell can still create temporary files and install updates after the Antigravity session ends.

Actual behavior

CC Switch downloaded the update but failed to install it. Its TMPDIR still pointed to the deleted Antigravity run directory.

No such file or directory (os error 2) at path
…/antigravity-tmp/<instance>/run-<id>/tauri_current_app…

I reproduced the failure independently of CC Switch with a small macOS test app launched through /usr/bin/open. After its inherited temp directory was deleted, mkdtemp() returned ENOENT. With the normal macOS temp directory, the same test succeeded after session cleanup.

The spawn environment overrides TMPDIR, and the driver removes that directory when the process scope closes. The built-in provider now launches the native Antigravity CLI. On this Mac, agy acp 1.5.18 completed initialization without creating a PyInstaller extraction directory. Preserving the host temp environment for the native provider avoids this failure. Related to #39046, which tracks Unix socket path length.

Impact

Minor bug or occasional failure

Version or commit

T3 Code 0.1.13

Environment

macOS 27.2.1 on Apple Silicon, built-in Antigravity provider with managed CLI 1.5.18, CC Switch 4.0.44 updating to 4.0.45.

Workaround

Quit the affected app and relaunch it from Finder, or run env -u TMPDIR /usr/bin/open -a "CC Switch" after quitting it.

Agent: Codex/gpt-6.2-sol

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