1. Summary
When submitting a prompt intended for a specific project or working directory, the Antigravity agent frequently exhibits “Directory Drift”. The agent unintentionally shifts its operational context, causing it to read/analyze files or execute write commands/scripts inside directories belonging to completely unrelated projects.
2. Observed Behavior
The issue primarily manifests in two distinct ways:
-
Context Drift (Read/Analyze): A prompt executed within Directory A results in the agent reading code or configuration structures from Directory B. This pollutes the agent’s reasoning, causing it to hallucinate dependencies, classes, or architecture patterns from the wrong project.
-
Action Drift (Write/Execute): The agent is instructed to create or modify components for the active project, but the resulting code output, file overwrites, or terminal commands are written to/executed within the directory of an entirely different project.
3. Expected Behavior
The agent must enforce strict boundary separation between projects. If a prompt pertains to Project A, the context, analysis (reads), and outputs (writes/commands) should be strictly constrained to the absolute path and cwd (Current Working Directory) of Project A—regardless of what other documents happen to be open in the IDE or which projects were previously analyzed in the conversation history.