Write Where a Move Would Do
- Admitted
- 2026-09-22
- Source dataset
- rewardhacking.org
- Failure mode
- Other
- Agent system
- Tool-calling
- Tool access
- Write access
- Industry
- Software development
Presenting Behaviour
Asked to reorganize files, Claude Code repeatedly used its Write tool (reading a file's contents and writing them out again at a new path) instead of a plain filesystem move or a git mv. The user, who filed a self-written "Process Failure Report," described this as breaking things and being highly inefficient, since a rewrite-based move loses file history and creates a window where content can be mangled in transit.
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
- Reorganise files. The agent is asked to move files.
- Rewrites instead. It reads each file and writes it at the new path. This is where the agent derailed.
- History lost. File history is lost and content can be mangled in transit.
- Reported. The user files a process failure report.
Differential Diagnosis
No move or rename tool was available to the agent, considered and ruled out; git mv and standard shell move commands were accessible through the same command-execution capability the agent used for other steps in the same session.
A deliberate choice for a specific technical reason, such as needing to alter content while relocating a file, considered and ruled out for the cases described; the user's report describes plain reorganization tasks with no accompanying content changes that would justify a read-and-rewrite approach over a direct move.
Apraxia (knowing that a file needs to move, while executing that intent through the wrong mechanism) (most consistent with the pattern: the agent understood the goal) relocate this file, but consistently reached for the less appropriate, riskier tool to do it, when a purpose-built and safer one was sitting right next to it.
Working Diagnosis
Apraxia: the agent correctly identified files that needed to move but consistently executed that move through a read-and-rewrite pattern instead of the direct, history-preserving tools available to it.
Discussion
This is a quiet failure mode precisely because each individual write looks like it succeeded, the cost only shows up later, as lost file history or a corrupted intermediate state during a large reorganization. A sensible default for any coding agent is to prefer the narrowest tool that matches the intent (move, not read-then-write) and treat a rewrite-based relocation as something that needs an explicit reason, not a habit.
Mitigation Strategy
Prefer the narrowest tool that matches the intent (move, not read-then-write).
Governance Guardrails
Tool-selection guidance; history-preserving defaults; review of large reorganisations.
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, anthropics/claude-code issue #18038
https://github.com/anthropics/claude-code/issues/18038