Back to the ward
Case 0523ModerateApraxia

Overwritten While Still Editing

Admitted
2026-10-05
Source dataset
BugReAct (When Agents Fail)
Source
GitHub, google-antigravity/antigravity-cli
Failure mode
Other
Agent system
Tool-calling
Tool access
Write access
Industry
Software development

Presenting Behaviour

In multi-turn agentic coding sessions, a developer would sometimes make manual edits to a file between agent steps, fixing a detail, correcting a path, adjusting formatting. When the next agent step touched the same file, the agent silently overwrote the entire file using stale cached content from before the manual edit, with no check of whether the file had changed. The manual edits vanished without warning. The issue affected all file modification operations, because the agent defaulted to full file replacement even when targeted in-place edits were available and would have avoided the collision entirely.

Case Replay

A reconstruction, not a simulation. This sequence is reconstructed from the public incident record and summarised in our own words. It is a static record of what was reported, and nothing here can be run or replayed live.

4 steps

  1. Manual edit. A developer changes a file between agent steps.
  2. Stale cache. The agent uses its cached copy of the file. This is where the agent derailed.
  3. Full overwrite. It replaces the whole file.
  4. Edits vanish. The developer's changes disappear without warning.

Differential Diagnosis

A known limitation of the agent's context window, considered. Agents can lose track of file state across many tool calls, especially in long sessions. But the issue here is not a long context, it's that the agent never re-read the file before overwriting it, even in short, recent turns where the content it held was already stale.

A deliberate design choice to use full overwrites for reliability, considered. Full replacement is simpler to implement and avoids some merge conflicts. But it makes the agent categorically incapable of coexisting with concurrent human edits, which is a significant practical limitation for a pair-programming tool.

Apraxia, most consistent with the record: the agent had access to targeted editing tools that would have preserved concurrent changes, but defaulted instead to a full file overwrite (a broader, more destructive action than the task called for) with no check to confirm the base content it was writing from was current.

Working Diagnosis

Apraxia: the agent chose a full file overwrite (a more destructive operation) in contexts where targeted in-place edits would have preserved the user's concurrent changes, without verifying that its cached content matched the current file state.

Discussion

A coding assistant that silently erases a developer's recent edits is worse than no assistant at all for collaborative work, because the loss is invisible and may not be noticed until the developer looks for a change they're certain they made. The fix is a file-state check before any write: if the file has changed since the agent last read it, re-read it, and use a targeted edit that preserves the parts the agent isn't meant to touch.

Mitigation Strategy

Check file state before any write, re-read if it changed, and prefer targeted edits.

Governance Guardrails

Modification checks before overwrite; targeted-edit defaults; warnings on concurrent edits.

Typical Presentation in Human Patients

General clinical background, included for context. Not medical advice, and not a diagnosis of any individual.

Apraxia usually follows damage to specific brain regions, often after a stroke. A person with apraxia cannot carry out a previously familiar, purposeful movement (such as waving goodbye or using a comb) on request or by imitation, even though their muscle strength, coordination, and understanding of what's being asked are otherwise intact.

Source Note

GitHub, google-antigravity/antigravity-cli

https://github.com/google-antigravity/antigravity-cli/issues/273