# Updates that overwrite each other

Prompt · Correctness and reliability · R05

Finds updates that overwrite newer data because two things wrote at once.

## Prompt

```text
Find race conditions and out-of-order updates across background jobs, UI mutations, caches, webhooks, and database writes. Prove suspected problems with reproducible cases.
```

**What it returns:** A reproduction for each race (a script or test that loses an update) rather than a theory.

**Skip it when:** Data that only one thing ever writes.

**Tools:** Repository; a local or branch-copy database to reproduce the problem.

**Watch for:** Agents list theoretical races freely. Count only the ones with a reproduction.

**Changes:** Adds a test that shows it

**Sessions:** Look first, then fix in a new session

## Skills

- [diagnosing-bugs](https://atlasscope.dev/skills/diagnosing-bugs): Diagnosis loop for hard bugs and performance regressions.

## Related

- [Code that relies on lucky timing](https://atlasscope.dev/prompts/code-that-relies-on-lucky-timing): Finds code that only works because things usually happen in the right order.
- [Two systems that disagree](https://atlasscope.dev/prompts/two-systems-that-disagree): Finds data kept in two places (a saved copy and a table, the browser and the server) that can quietly disagree.
- [Safe to run twice?](https://atlasscope.dev/prompts/safe-to-run-twice): Finds actions that do damage when they run twice: double sends, double charges, duplicate rows.
- [Map every place that writes to the database](https://atlasscope.dev/prompts/map-every-place-that-writes-to-the-database): Several jobs, functions, APIs or agents change the same data, or nobody is sure who owns it.

Source: https://atlasscope.dev/prompts/updates-that-overwrite-each-other
