All ideasMore in Work

My coding agent stored prices as floats. 3 invoices came out a cent off.

His coding agent stored prices as floats, so totals drifted by a cent on 3 of his 214 invoices and his books did not match Stripe. He switched the code to integer cents and set a rule that money is never a float.

This one went wrong. Read what happened so you don’t hit the same problem.

How it works

  1. Coding agent stores prices as floats
  2. Summing line items drifts totals by a cent on 3 of 214 invoices
  3. His books no longer match Stripe
  4. He finds it and switches to integer cents, with a rule that money is never a float

Why it’s worth knowing

The agent code ran fine and still quietly broke his books, by one cent on 3 invoices, until Stripe did not match.

Where it’s from

Summarized from a public post on bsky.app. See the original ↗

Upgraded prompt

A ready-to-use prompt for this idea, built from research on what makes AI agents do the job right: who the AI should be, the exact steps, and a check to make sure it was done the way you wanted.

1Who the AI should be
2The prompt, with the steps
3The check when it’s done
Upgraded prompts are coming soon.

Try next

Every idea is a real post from someone who tried it, summarized in our words, with a link to the original. App names are swapped for plain words.