# Sandbox.Services.Ai.Chat.Retry

```csharp
System.Threading.Tasks.Task<Response> Retry(System.Threading.CancellationToken cancellationToken = null)
```

Resumes an interrupted Send using its retained conversation history. Completed tool callbacks
are not rerun. A callback cancelled during execution is retained as a tool error rather than rerun;
cancellation does not undo game actions already performed by a callback or server processing.
A response lost in transit may be generated and charged again on retry.

### Parameters

- `cancellationToken` (`System.Threading.CancellationToken`), default `null`: A token for the resumed operation, usually a fresh token after cancellation.

### Returns

`System.Threading.Tasks.Task<Response>`: The final response for the original interrupted turn.

### Exceptions

- `System.InvalidOperationException`: No interrupted turn exists, another operation is running, or MaxToolRounds is reached.

Declared in [Sandbox.Services.Ai.Chat](/api/Sandbox.Services.Ai.Chat).
Assembly: `Sandbox.Engine`.
