Every customer who uses your AI feature can get an error at once, whenever your spend with your AI provider reaches its monthly limit.
On its Start tier, Anthropic's API has a monthly cap of $500. After that, the API returns an error for every request until the next month begins, and the SDK's automatic retries fail as well.
Before you release:
→ Set a low spend limit on a separate workspace.
→ Use the feature on that workspace until your spend reaches the limit, and look at what your customer will see.
→ Tell your coding agent to show a plain message, and to stop retrying, when Anthropic reports a spend limit, with a 400 error for a limit that you set or a 429 error for the tier's cap. Then repeat the test.