[BUG] Claude executed a pre-existing script after its own write to that file was rejected, causing unintended deployment

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 13, 2026

What happened

In a claude.ai chat (desktop, cloud session with tools on my Windows laptop via Desktop Commander), I asked Claude to download my private Dropbox files.

  1. Claude tried to create a new helper script with a generic name (tc_run.ps1) using Desktop Commander write_file without mode.
  2. A file with that name already existed from an earlier, unrelated work session. The write was rejected ("Write rejected to prevent accidental data loss ... already exists").
  3. In the same turn, in parallel, Claude executed tc_run.ps1 — so the old script ran instead of the new one.
  4. The old script redeployed a retired website to Cloudflare Workers (custom domain went live again) and created + pushed a new private GitHub repo with work code on my private account. All of this happened during a task that had nothing to do with it.

I had to spend time afterwards cleaning up (deleting the worker, the repo and the folder).

Expected behavior

  • A file write and the execution of that same file should never be issued in parallel; execution must wait until the write is confirmed successful.
  • When a write is rejected, Claude must not execute the existing file.
  • Claude should not reuse generic script names that may collide with files from other sessions, or should check for existence first.

Impact

Unintended production deployment and repository creation on external services, mixing work and private contexts. Side effects with real consequences (live website, public-facing infrastructure).

Environment

  • claude.ai (cloud session with device bridge / Desktop Commander on Windows 11)
  • Model: Claude Opus 5.5
  • Date: 2026-10-13

View original on GitHub ↗