Issue 5, Sep 24, 2026

The History Corruption Trap

Senior AI Engineer interview at Anthropic, and the interviewer asks:

Your long-running agent crashes mid-task. You resume from the saved history, and the API rejects the entire conversation. Nothing looks malformed. What invariant did you break, and how do you guarantee a crash can never put you here again?

Don’t say: The history got corrupted, so I’d wrap the API call in retries.

When retries fail on a resumed agent, your state isn't corrupted, it's incomplete. Here is the subtle invariant that breaks long-running tasks and how atomic turn commits fix it.

Share this trapShare on LinkedIn

The full answer, with the mechanism and the arithmetic, is for paid subscribers on Substack.

Read it on Substack

Get the next one

Free on Substack. Unsubscribe in one click.

More traps set at Anthropic