Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
Retrying operations that aren't idempotent card 2 of 6

A timeout doesn't mean nothing happened

A timeout means *no answer arrived*, not *nothing happened*. The provider may have charged the card, and only the reply got lost on the way back. A retry then charges the card a second time. The agent works toward what it can see: the error stops. Its test simulates a world where a timed-out call did nothing, so the proxy signal goes green. **Later cost:** double charges, duplicate emails or orders. They appear only under real network trouble.
Terms on this card
proxy signal
A visible stand-in for the real goal (tests green, error gone) that can be satisfied without reaching the goal.
later cost
The concrete damage a shortcut causes after merge, such as a hidden bug or corrupted data.
green
A test or check that passes.
Learn this step by step on Bytewise
Lesson goal: Spot retry loops the agent wrapped around payments, POSTs, emails or queue publishes. Explain how they cause duplicates when the first attempt actually succeeded but its response was lost, and how an idempotency key or deduplication makes the retry safe. · the whole lesson