# update_strategy

> Replaces a strategy's graph with the complete graph Claude sends, saved as a new version. Prior versions are kept.

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

Save a new version of a strategy · strategies · write

> [!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

Saves a new version of a strategy's graph. Claude sends the complete graph: the `nodes` and `connections` that [get_strategy](https://orbitalaip.com/docs/claude-and-chatgpt/tools/get_strategy) served, with its changes, never a diff. A node left out of the list is removed. It also sends `base_version_hash`, the `version_hash` from `get_strategy` or the `versionHash` of its latest create or update receipt, so a save it has not seen is never overwritten. It is not for a new strategy; that is [create_strategy](https://orbitalaip.com/docs/claude-and-chatgpt/tools/create_strategy).

Claude reaches for it to change a stop, add a filter, retune a period or declare a parameter, before it estimates and runs again. The graph passes the same gate as a create: every required field must be set unless `allow_incomplete_config` is true. The name and description stay as they were unless Claude sends new ones. Prior versions are kept, and the receipt carries the new `versionHash` for the next edit.

It needs the write permission, shown on the consent page as **Create and edit strategies**, 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.

One caveat: only a draft that nothing runs may be edited. A strategy deployed to alerts, a paper account or a live account, a published workflow, one with an automation attached, or one another workflow runs as a sub-workflow is refused. For a deployed strategy, stop the deployment first; a paused one still locks it. Alerts stop in Backtesting, a paper or live account in Trade. Or ask Claude to create a new strategy with create_strategy and change that one.

## Parameters

| Parameter | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| workflow_id | string | yes | The strategy's workflow id, a UUID: createdWorkflowId from the create receipt, or strategy.workflowId from get_strategy. Not the strategy id. | 0193c2a1-5b7e-7f10-9c3d-2a6b8e4f1d07 |
| base_version_hash | string | yes | The version_hash of the graph being edited: from get_strategy, or the versionHash of the latest create_strategy or update_strategy receipt. | 9f2c1e7a4b8d0356c1a2e4f6b7d8c9a0e1f2a3b4c5d6e7f8091a2b3c4d5e6f70 |
| nodes | array | yes | The complete node list with the changes, 1 to 50. Each has an id (up to 64 characters, unique in the graph), a type from the authoring guide, an optional config object (the save gate still checks its required fields), and an optional label of up to 255 characters. | [{"id": "exits", "type": "exit-rules", "config": {"stop_kind": "percent", "stop_percent": 8}}] |
| connections | array | no | The complete edge list, up to 100. Each names the from and to node ids. fromPort defaults to the source node's one output and toPort to the target node's one input. | [{"from": "exits", "fromPort": "strategy", "to": "size", "toPort": "strategy"}] |
| name | string | no | A new strategy name, 1 to 255 characters. Omit it to keep the current name. | SPY golden cross, 8% stop |
| description | string | no | A new description, up to 2000 characters. Omit it to keep the current one. | Same rules as before with the stop tightened to 8%. |
| allow_incomplete_config | boolean | no | Save with config gaps still open. Default false: every required field must be set. | false |
| declared_parameters | object | no | Knobs a rule-card strategy exposes to run_backtest's parameters, by name, in the same shape create_strategy takes. Sending it replaces the whole declaration. Ignored on a Program strategy. | {"stop_percent": {"type": "number", "default": 8, "min": 2, "max": 20, "target": {"nodeId": "exits", "field": "stop_percent"}}} |

## What comes back

- `ok`: true.

- `note`: the receipt in words. It says the draft was edited in place and saved as a new version, that it is a tracked strategy with its `strategyId`, which knobs a run may now tune, and whether any node still needs settings.

- `editedWorkflowId`: the workflow id.

- `strategyId`: the strategy id, which `estimate_backtest` and `run_backtest` take.

- `versionHash`: the hash of the saved graph, which the next `update_strategy` takes back as `base_version_hash`.

- `requiredConfigComplete`: true when every required field is set. Otherwise the receipt carries `nodesNeedingConfiguration`, a `mustTell` sentence naming each node and the settings it needs, and `configGaps`.

- `name`: the strategy's name after the save.

## Try saying

- "Change the stop to 8% and rerun."
- "Add a 200-day regime filter to the golden-cross strategy and save it as a new version."
- "Declare the SMA period as a parameter between 20 and 100 so I can sweep it."

## If it fails

- **update_strategy needs the 'write' scope, which this connection was not granted. Ask the user to reconnect Orbital with it.** — The connection was made without the Create and edit strategies permission. Connect Orbital again and leave that permission on.
- **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 use the read tools.
- **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.
- **The draft changed since you read it — read it again with get_strategy, then send your edit on top of what it serves, with its versionHash as base_version_hash.** — base_version_hash is not the hash of the stored graph. Someone saved the strategy in Orbital, or a build stamped a module on it, after Claude read it. Claude reads the strategy again and sends its edit on top of the fresh graph with the fresh hash. Nothing was overwritten.
- **Send base_version_hash: the versionHash your latest get_strategy, create_strategy or update_strategy result gave for this draft, so a save you have not seen is never overwritten.** — base_version_hash was blank. Claude reads the strategy and sends its version_hash.
- **No workflow <workflow_id> in this project. Create a new draft with create_strategy instead — and never edit a workflow a person made.** — The workflow id is wrong, names a strategy id instead, or the workflow is archived or in Orbital's trash. Claude takes the workflow id from the create receipt or from get_strategy.
- **"<name>" is deployed to a paper account (<status>), so it may not change while that deployment runs. Branch it in Orbital and change the branch instead.** — The strategy is deployed to alerts, a paper account or a live account, and an edit would change what runs. The message names the target and the deployment's status. Stop the deployment first (alerts in Backtesting, a paper or live account in Trade), then edit, or create a new strategy with create_strategy.
- **"<name>" is published — only a draft may be edited. Create a new draft with create_strategy instead — and never edit a workflow a person made.** — The workflow is published, has an automation attached, or is run by another workflow as a sub-workflow. The message says which. Create a new strategy with the change, or edit this one in Orbital's editor.
- **Node "<node_id>" sends <key> as clipped text, which is not a value. Send the whole value, or send back exactly what get_strategy served for that node to keep the saved one.** — Claude sent an edited copy of a value that get_strategy had clipped, so the saved value cannot be restored from it. Claude sends the whole value, or the clipped text exactly as it was served to keep the stored one.
- **Invalid arguments for 'update_strategy': <each problem, separated by semicolons>** — The graph failed the save gate. The rest of the message names each problem, such as an unknown node type, a port that is not wired, or a required field that is not set. Claude fixes every named problem and saves again.
- **declared_parameters was refused. <each problem>** — A declared knob is malformed, targets a node or field the graph does not have, or aims a number knob at a setting that is not numeric. The graph was not saved. Claude corrects the declaration and saves again.
- **The workflow could not be edited.** — The save failed for a reason that carried no message of its own. Ask Claude to try again. If it keeps failing, edit the strategy in Orbital's editor.

## Related

- [Read one strategy](https://orbitalaip.com/docs/claude-and-chatgpt/tools/get_strategy)
- [Create a strategy](https://orbitalaip.com/docs/claude-and-chatgpt/tools/create_strategy)
- [Estimate a backtest](https://orbitalaip.com/docs/claude-and-chatgpt/tools/estimate_backtest)
- [Troubleshooting](https://orbitalaip.com/docs/claude-and-chatgpt/troubleshooting)
