# cancel_backtest

> Cancels a queued or running backtest. A finished run is refused, and a cancelled run cannot be resumed.

Source: https://orbitalaip.com/docs/claude-and-chatgpt/tools/cancel_backtest

Cancel a backtest · backtests · destructive

> [!IMPORTANT] Disclaimer
> Backtest results are hypothetical and do not predict future performance. Nothing here is investment advice: Orbital computes the rules you supplied and recommends nothing. Orbital is not a registered investment adviser or broker-dealer. Costs are as modelled by the chosen cost profile and may differ from live trading.

## What it does

Cancels a queued or running backtest. Claude reaches for it when you change your mind about a run that is still going: wrong dates, the wrong strategy, or a long intraday run you no longer need. A cancelled run bills nothing and cannot be resumed. Its row stays in Orbital with the status cancelled.

It needs a run id, and the run must still be queued or running. A finished run is refused with a message that says it is already completed, failed or cancelled. It needs the run permission, shown on the consent page as **Run backtests, which spends credits**, and a project role that may write: project owner, editor or member, or workspace owner or admin. A viewer's call is refused: a read-only role cannot use write or run tools.

The cancel is best effort against the engine. When the engine has already finished the run, the call is refused and the result is importing. When the engine never received the run, the run is marked failed with that reason and the answer carries the failed status. When the engine is still stopping it, the answer carries the status the run still has, and the engine's terminal event settles it.

One caveat: the tool is marked destructive, so Claude or ChatGPT may ask you to confirm before calling it.

## Parameters

| Parameter | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| run_id | string | yes | The run id, a UUID. From run_backtest or get_strategy. | 0193c2b4-9e21-7a6c-8f3d-5b7a9c1e2d48 |

## What comes back

- `run_id`: the run id.

- `status`: the run's status after the call: `cancelled` when the engine stopped it, `failed` when the engine never received it, or the status it still had while the engine was stopping it.

## Try saying

- "Cancel that backtest, I gave you the wrong dates."
- "Stop the intraday run. I will rerun it on daily bars."

## If it fails

- **cancel_backtest needs the 'run' scope, which this connection was not granted. Ask the user to reconnect Orbital with it.** — The connection was made without the Run backtests permission. Connect Orbital again and leave that permission on, or cancel the run in Orbital.
- **Your role in this project (viewer) cannot change strategies or spend credits.** — Your role in the connected project is read-only. The message names the role it found. Ask a project owner for a role that may write, or cancel the run in Orbital.
- **Backtesting is not active in this project — turn it on under Settings → Apps in Orbital, then try again** — The Backtesting app is off in the project you connected. In Orbital open Settings, then Apps, and turn Backtesting on for the project you connected.
- **No such run in this project.** — The id is wrong or the run belongs to another project. Claude takes the run id from run_backtest or from get_strategy.
- **The run is already completed.** — The run is finished. The message names its status, which is completed, failed or cancelled. Nothing to cancel. Read the result with get_backtest.
- **The engine already finished this run (completed) — the result is importing.** — The engine finished the run before the cancel reached it. The result is on its way into Orbital. Poll get_backtest for the verdict.
- **The backtesting engine is not configured on this deployment.** — The deployment has no backtesting engine. Nothing on your side. Contact Orbital support.

## Related

- [Run a backtest](https://orbitalaip.com/docs/claude-and-chatgpt/tools/run_backtest)
- [Read a backtest run](https://orbitalaip.com/docs/claude-and-chatgpt/tools/get_backtest)
- [Troubleshooting](https://orbitalaip.com/docs/claude-and-chatgpt/troubleshooting)
