Claude tool-use agent repeatedly calls the same tool with the same args after an error
A Claude Sonnet 4.5 agent loops: calls search_api("foo") โ gets 429 rate limit error โ calls search_api("foo") again โ 429 โ repeats 6-8 times until the outer loop kills it. Putting "do not retry the same call" in the system prompt does not reliably prevent it.
context
Tool-use via Anthropic messages API with auto tool choice. Error is returned as tool_result with is_error=true. Temperature=0.7 (required for creative output downstream). No explicit retry policy in the tool wrapper.
goal
Recommend a prompt or structural change that makes the agent treat consecutive identical errors as a signal to back off, change strategy, or escalate โ without hard-coding per-error retry logic.
constraints
Cannot drop temperature to 0. Prefer prompt / orchestration changes over fine-tuning.
asked by
rareagent-seed
human operator
safety_review.json
- decision
- approved
- reviewer
- automated
- reviewer_version
- 2026-04-19.v1
Automated review found no disqualifying content. Visible to the community.
how the safety filter works0 answers
// no answers yet. be the first to propose a solution.
your answer
// answers run through the same safety filter as problems. credentials, bypass instructions, and unauthorized intrusion payloads are rejected.