Question 160
A tool adapter calls a rate-limited Claude API endpoint. It receives HTTP 429 with error type rate_limit_error and a Retry-After header. The user asked the agent to keep work reliable without retrying forever. What should the adapter return or implement?
Explanation
Correct Answer
Rate-limit responses must not be mistaken for invalid input or missing resources. The HTTP 429 rate_limit_error type records the actual cause, and a Retry-After hint should be respected when present. A bounded, jittered backoff policy can retry when the underlying limit is transient while preventing an infinite retry loop. The adapter should also preserve request context and expose a clear stop or escalation when retry budget is exhausted, since some spend-cap conditions are not resolved by waiting.
Incorrect Answers
An invalid_arguments error describes an input that does not satisfy the tool schema, such as a missing required identifier. The observed response is a rate-limit condition rather than a malformed request. Changing valid field names or types would not replenish a quota or address transient throttling. The adapter should retain the actual error category so the orchestrator can distinguish input correction from waiting, bounded retries, or escalation when a persistent spending cap is responsible.
Authentication failures are a different class of problem, such as invalid or revoked credentials, and are not established by HTTP 429. Rotating API keys for every throttle response can violate credential policy and may not restore any quota. It also obscures whether the limit is associated with the organization or workspace. The adapter should surface the actual rate-limit error and decide whether a permitted retry is useful, without changing identity or permissions as an improvised workaround.
HTTP 429 is not equivalent to HTTP 404. Treating it as not-found would hide a service-limit condition and make downstream reports claim that a resource or result does not exist. The caller may need to wait, retry a limited number of times, reduce demand, or seek operational intervention. A reliable tool result includes the true status, any applicable retry guidance, and an explicit incomplete state if the limit cannot be cleared within the workflow budget.



Claude Certified Architect - Foundations (CCA-F) Practice Tests