
How to Stop an AI Agent Tool Loop—and Keep It Stopped
Stop new tool execution, preserve verified results, and reconcile any uncertain write before resuming. A turn limit contains a loop; progress checks and operation records make recovery safer.

Stop new tool execution, preserve verified results, and reconcile any uncertain write before resuming. A turn limit contains a loop; progress checks and operation records make recovery safer.

Start with the final outbound request. Use the instruction field and message positions supported by that exact endpoint, preserve tool-call pairs, and verify the full task after the role error clears.

For direct Anthropic API access, set ANTHROPIC_API_KEY and approve it in the interactive CLI. Gateways need their own endpoint and credential; cloud providers and Desktop use separate configuration paths.

Start with /context for session drift, check loaded instructions before editing memory, and verify Context7 authentication and returned docs before adding another server.

To use DeepSeek in Claude Code, choose OpenRouter's gateway or DeepSeek's Anthropic-compatible endpoint. Each needs its own key and model names; a successful reply alone does not confirm the model or coding-tool compatibility.

For an Opus 4.7 `top_p deprecated` error, omit sampling fields from the final request your client sends. Native Messages and Bedrock Converse put those fields in different places; keep the same model and task when checking the fix.

A Nano Banana Pro 503 can include Deadline expired wording. Check the responding service and error code first, retry with a clear limit, and count recovery only when the same image request produces a usable result.

Use Files and Interactions for recordings, or the Live API for raw PCM captions. Vocabulary biasing and recorded speaker or word annotations require separate configurations.

The official Batch API cuts Gemini 3 Pro Image output prices to $0.067 for 1K/2K and $0.12 for 4K, before input and thinking charges. Use it for nonurgent work, budget for all billed tokens, and match downloaded images to their request keys.

As of October 6, 2026, only GPT-6.1 Sol is open to developers. Fable 5.5 is unannounced, Gemini 4 Argon is limited to Fairwind, and GPT-6.1 Astra was canceled.

Block the next unaffordable model request before dispatch: reserve its maximum cost against the shared run budget, reconcile the billable result, and keep budget stops terminal across retries and helpers.

Limited retention can fit an approved workload. ZDR requires evidence for the exact account, model, endpoint, features, and data path—and a gate that rejects unapproved changes.

For a confirmed Nano Banana 2 503 response, retry with jitter within an attempt and time budget. Keep the image workflow intact, verify image output, and defer work when recovery cannot fit the deadline.

Call gemini-3-pro-image through Google Interactions, save image bytes from the full response, and compile your own JSON or YAML job settings. PDFs need a document-capable model before Pro receives the verified facts and page images.

If Pro returns a restriction message or no image, first recover the correct Pro route: More → Redo with Pro in Gemini, the Pro menu in eligible AI Mode accounts, or gemini-3-pro-image in the API. Then check the actual response before calling the failure a policy block.

For "Unsupported file URI type," check the exact image value your app sent and the endpoint that rejected it. Native Gemini can accept supported HTTPS URLs; local paths, unresolved templates and base64 data URLs need a different payload. Verify the repair by getting an edited image from the same Pro request.

For APIConnectionError, capture the underlying exception and test DNS, TLS, proxy settings, and the exact endpoint from the failing runtime. An HTTP response narrows the problem; recovery still requires a successful request through the original application.

For transcripts, start with transcription. For a spoken assistant, compare Realtime—including mini—with the whole STT–LLM–TTS stack. A ten-minute call is not ten minutes of user audio plus ten minutes of assistant audio.

A Cyber Abuse email is a warning or a deactivation. If you are locked out, send one complete appeal, request your data, and stop the next charge where you pay.

Start by locating the context growth: before a tool call, after a large result, or across repeated attempts. Then change discovery, output, or conversation history and verify that the same task still works.

Claude Code mods need terminal v2.1.287+ (Desktop v2.1.286+) and install as plugins. They run unsandboxed with your access, so run plugin validate first.

Sonnet 5.5 keeps Sonnet 5's $2/$10 token prices. On Artificial Analysis tests it costs less per task from low to xhigh effort and about 51% more at max.

Temporarily unable to authenticate comes from Anthropic: stay signed in and retry. Login expired or Failed to authenticate means /login. The wording decides.

A Codex token-exchange 403 is a refused authentication request. The full error tells you whether to repair callback access, check the client’s network, renew stored credentials, or stop for an access restriction.