# When a Step Fails: How TicketResolve Decides Whether to Retry or Ask a Person

> A technical case touches many systems, and some of them fail. A monitoring API times out, a token expires, a reproduction doesn’t work. TicketResolve now classifies every failure the same way, retries only steps that are safe to repeat, never repeats one that changes something, and tells a person exactly what to do when it can’t recover on its own.

Source: https://www.ticketresolve.ai/blog/when-a-step-fails-recover-or-ask · Published 2026-11-25 · TicketResolve AI

**Every technical case depends on systems TicketResolve doesn't control: your monitoring, your logs, your repository, the customer's environment. Sometimes one of them fails. The question is what to do next. Retrying everything makes a temporary blip disappear, but it also repeats work that shouldn't be repeated, hides real problems and spends effort on errors that will never go away. Asking a person about everything turns every timeout into a ticket.**

Release 7.143.0 answers that question the same way for every engine. This post explains how.

## One vocabulary for failures

Before this release, each engine classified its own failures. The investigation run marked an agent as failed with an error message. The workflow engine had its own failure groups. The model gateway had its own error kinds. A timeout looked different depending on where it happened.

Now every failure gets one of these classes:

| Class | Examples |
|---|---|
| Temporary | Timeouts, dropped connections, 429 and 5xx responses, "try again" |
| Access | 401 or 403, bad credentials, an expired token, permission denied |
| Configuration | Not connected, switched off, no repository chosen |
| Usage limit | A quota or budget reached |
| Missing record | 404, a branch or file that no longer exists |
| Conflict | 409, "the code has changed since…" |
| Refused | Declined or rejected, by a customer or a reviewer |
| Verification | Tests failed, or the deployed fix didn't fix the problem |
| Unknown outcome | An action in another system that may or may not have happened |
| No progress | Nothing changed for longer than the state allows |
| Unknown | Anything else |

The class comes from the engine's own record: the failed agent's error, the code index's error, the fix assistant's error, the verification's verdict. Every failure is recorded once in a recovery ledger, with its class, what was decided and why.

## The rule: only retry what is safe to repeat

The most important decision isn't how often to retry. It's which steps may be retried at all. TicketResolve retries automatically only steps that read and change nothing outside it: **the investigation run** and **the code index**. Neither makes an AI call, and running either again only collects evidence or reads code.

Everything else is never retried automatically, whatever the error:

- **A reproduction** runs in the customer's environment, with their consent.
- **A fix proposal** uses the AI budget for code and needs a person's judgment.
- **Failing tests** mean the fix needs another look, not another run.
- **A verification that says "not fixed"** is an answer, not an error.
- **An action whose outcome is unknown**, such as a pull request that may or may not have been opened, could happen twice.

## How a retry works

For the two safe steps, a retry needs three things to be true:

1. **The failure is temporary.** An access or configuration failure won't fix itself. Retrying it only produces more failures and hides the real problem, so those go straight to a person. A usage limit gets one more try after it resets. An unknown error gets one retry, then a person.
2. **There's budget left.** The waits are 5, 15 and 45 minutes. A step gets at most 3 attempts, and a case gets at most 6 automatic retries a day.
3. **It hasn't already failed the same way.** If the step failed with the same inputs for a reason that isn't temporary, running it again would fail the same way. It runs again only when its inputs change, for example when new evidence arrives, or after a person deals with it.

A retry counts as **recovered only when its own new record says so**: the new investigation run finished, or the new index finished. "The retry started" doesn't count.

If two background workers find the same due retry at the same moment, only one runs it. Each retry is written to the investigation's audit trail.

## Shadow first

Automatic retries start in **shadow mode**. The ledger records "would retry at 10:45", but nothing runs. That lets you see what automatic recovery would do on your own cases before it does anything. An admin switches it to live on the Engineering intelligence page.

Escalations to people aren't automation, so they work in both modes.

## When it can't recover: ask the right person the right thing

An escalation says what failed and what to do. It appears on the case and in the **Decision Inbox**. Examples:

- *Access:* "Reconnect the integration or fix the account's permissions, then run it again."
- *Configuration:* "Connect or switch on what is missing, then run it again."
- *Failing tests:* "Look at the failing tests; the fix needs another look before review."
- *Verification:* "Reopen the investigation: the deployed fix didn't resolve the problem."
- *Unknown outcome:* "Check the other system, then release the action on the case page."

An escalation leaves the inbox when the problem goes away, for example when a newer investigation run succeeds, or when a person marks it handled and says what they did. That note goes in the audit trail.

## Two illustrative cases

**Dashboards slow.** The investigation run's telemetry agent timed out reaching the monitoring API. That's a temporary failure of a safe step, so it's retried after 5 minutes. The second run finishes, and the ledger records it as recovered. Nobody had to look.

**Logs locked out.** The same agent got a 401 Unauthorized. Retrying would only produce more 401s, so it goes to a person: the case page and the Decision Inbox say to reconnect the integration. An admin rotates the key, marks the escalation handled with "Reconnected with a new API key", and runs the investigation again.

## Cases that stopped moving

Release 7.142.0 introduced stalled cases: a case waiting on TicketResolve with no change for longer than its state allows. Recovery now acts on them too. A case that stopped before its investigation finished gets one new investigation run. If it stops again, or stalls in a later state, a person is asked to look.

## Recovery analytics

Engineering intelligence now shows recovery over the last 30 days, overall and by failure class:

- how many failures were recorded;
- how many were retried and how many recovered;
- how many are waiting for a person;
- how many would have been retried in shadow mode.

The success rate is recovered retries out of retries whose outcome is known. Retries still waiting for their result aren't counted as failures.

## What's next

The next release is about fixes: several candidates from the same single AI call, compared on the existing checks, plus security and API-compatibility checks in the validation report. That release is planned, not shipped.
