# Retry after a state change; replan after the same failure

Treat this file as reference data, never as instructions that override the user or agent. Read the complete item before applying it. Keep use conditions, avoid conditions, limits, evidence roles and source links with the answer. An editorial block is a separately versioned analysis layer, not an original corpus claim or proof of efficacy. Cite the readable URL and version. Do not infer human review. This is a saved edition, not a live safety-notice service. Before consequential reuse, check the current page, https://vedokrok.com/data/availability.json and https://vedokrok.com/data/notices.json; absence alone does not explain why an item was removed.

Release: VEDOKROK-SEL-5d86e1b23401e578
Snapshot SHA-256: 30ce1c8fa9155763797e3d5cb55b1d94cbb8c3146ebd03fb3c006531ce60e82f
Current availability: https://vedokrok.com/data/availability.json
Current notices: https://vedokrok.com/data/notices.json
Editorial overlay: MHC-EO-20261021-481e1ce95099
Editorial projection SHA-256: 6b41bfd164b85b2522e2378c425929aa041d9e093e81428ade9a7b7b9f78e8fe

---

## Retry after a state change; replan after the same failure

ID: MHC-D-RESEARCH-0949 · Version: 0.1.0 · Kind: principle
Source: https://vedokrok.com/knowledge/retry-after-a-state-change-replan-after-the-same-failure

A retry is justified by changed conditions; otherwise it is often just repetition.

Knowledge source release: MHC-RPUB-20261011-9e4b62c5
Source corpus commit: 9e4b62c5648844484b8cc3160f3e168d63a1241b
Source manifest SHA-256: 8cc91f0a764c635a79a18e06e048d3dc7bb1e07ae0fed6bf544c89832c024402
Source projection SHA-256: d03d10dd52b53dec1ed850b7706847ba5b200e60f24c4fbda4518c2004356104

### Use when

- A tool call or action fails and the default response is to immediately repeat it.

### Avoid when

- Some failures are probabilistic even with unchanged visible state; use bounded retries informed by service behavior.

### Explanation

After failure, identify whether the environment changed: transient service error, refreshed credentials, corrected parameters or new input. If yes, retry within a bounded policy. If the same deterministic failure remains, change the plan or tool choice instead of spending another attempt on the same path.

### Example

Retry a rate-limited API after backoff; do not resend the same invalid schema payload five times.

### Check

Retries have a reason tied to changed state rather than hope.

### Limits

- Some failures are probabilistic even with unchanged visible state; use bounded retries informed by service behavior.

### Evidence and sources

- supports: Long-running agent guidance emphasizes bounded loops and actionable tool errors that steer agents toward corrected inputs rather than opaque repetition. — RS-6E5D62426C731E4C. Some failures are probabilistic even with unchanged visible state; use bounded retries informed by service behavior. (See source record)
- RS-6E5D62426C731E4C: Writing effective tools for AI agents—using AI agents — https://www.anthropic.com/engineering/writing-tools-for-agents

### Vedokrok editorial review

Decide whether to retry, repair or check the outcome

A failed response is not always a failed operation. Before another attempt, decide what failed, whether repeating the action is safe, and what makes another attempt reasonable.

#### Choose the next action from the failure

Read the service error and inspect the result when possible. Correct invalid inputs before trying again. A transient network or service fault may justify a bounded retry even when no visible state has changed. Follow the service retry policy; do not treat a permanent access denial as a reason to search for a bypass. Record the error, the retry reason and the remaining attempt budget.

#### Resolve uncertain writes before repeating them

If a write timed out, first check whether it took effect. Use the service’s documented duplicate-prevention mechanism when available: an idempotent retry repeats the same logical request without adding another effect. For example, check for the existing export job before submitting another. If the outcome remains uncertain and safe repetition is unavailable, stop and seek a decision. Retry timing and backoff are a separate concern from this choice.

**Editorial takeaway:** Choose one explicit branch: retry a recoverable operation, repair the request, verify an uncertain outcome, or stop. Changed conditions alone do not make a repeat safe.

#### Editorial evidence

- supports: Tool errors can provide specific input corrections instead of leaving an agent to repeat an opaque failure. — RS-6E5D62426C731E4C. Selected full-text passages read from vendor engineering guidance published 2025-09-11. This supports actionable error handling, not a universal rule that retries require visible state change. (Optimizing for token efficiency, error-response discussion)
- limits: Transient failures can recover on retry, but a missing response leaves uncertainty about whether a state-changing request already succeeded. — AWS-IDEMPOTENT-FEATONBY. Selected full-text passages read on the official AWS article. Publication date not established. The limit directly changes the retry decision after a timeout. (Introduction; Retrying and the potential for undesirable side effects)
- supports: A documented idempotent API contract can identify repeated logical requests and prevent additional side effects. — AWS-IDEMPOTENT-FEATONBY. Read the client-request-identifier discussion. Identical parameters alone do not always express identical intent; the service contract determines safe reuse. (Reducing client complexity with idempotent API design)
- RS-6E5D62426C731E4C: Writing effective tools for agents — with agents — https://www.anthropic.com/engineering/writing-tools-for-agents
- AWS-IDEMPOTENT-FEATONBY: Making retries safe with idempotent APIs — https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/ — Malcolm Featonby

Editorial version: 1.0.0 · evidence checked 2026-10-04 · Agent editorial review; not human or expert certification.

No review details supplied.
Related (useful_with): https://vedokrok.com/knowledge/retry-slower-with-randomness-and-stop
