# runWithRetry

**Kind:** Function

**Source:** [`atloria-monorepo/libs/agent-core/src/benchmark/retry-runner.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/benchmark/retry-runner.ts#L69)

Run a benchmark task with retries, picking the best result.

## Signature

```ts
async function runWithRetry(task: BenchmarkTask, runOnce: (task: BenchmarkTask, temperature?: number) => Promise<TaskResult>, config: RetryConfig, log: (msg: string) => void): Promise<RetryResult>
```

## Parameters

| Name | Type |
|---|---|
| `task` | `BenchmarkTask` |
| `runOnce` | `(task: BenchmarkTask, temperature?: number) => Promise<TaskResult>` |
| `config` | `RetryConfig` |
| `log` | `(msg: string) => void` |

**Returns:** `Promise<RetryResult>`
