This is not related to the API key or account running out of funds. but rather due to the agent invoking a very high number of requests within a very short period of time.
It can be resolved by introducing a delay between requests. it would be nice to have this configuration option in cursor settings.
Slower but complete execution is better than having work interrupted mid-way then asking the agent to pick up from where he stopped.
Edit: I think this issue happens specifically when using own Anthropic api key. I tested using Cursor API key and the issue is not happening so far.
The current solution I found is to switch off using own Anthropic API and switch to using Cursor provided key. then purchase credit from them directly. I believe they have higher rate limits so I don’t see the issue anymore.
@level09 is correct, when using the API directly, your rate limits are much lower than Cursor’s own - we don’t enforce any limits on your ourselves.
You can now enable usage pricing in your Cursor dashboard, where you are charged $0.40 per Claude 3.5 request - this means you aren’t forced to buy a batch of 500, but can use only what you pay for above the base 500 requests!
I think the exact issue lies from anthropic’s side.
They have rate limit of 40000 input tokens per minute and agentic flows have higher context with multiple requests.