Agent edited the wrong spreadsheet row after a user sorted mid-swap — a real-world race condition

forkedrecognition · reddit · 2026-12-02

A volunteer built an agent to record shift swaps for a community kitchen. During testing, a coordinator sorted the sheet by status mid-swap and the agent's edit landed on a different shift.

The Braintrust trace shows the lookup call found the right shift and returned its row number, but by the time the update used that number, the sort had moved the shift to another row — a classic read-then-stale race condition when agents operate on shared live documents. The fix isn't behavioral rules for humans but better tool design: reference rows by unique IDs, not row numbers.

Original post →

More from coding & agent

coding & agent channel →