tose deployment
Work with one deployment by its ID: wait for it, cancel it, or roll back to it.
Deployment IDs double as task IDs. You get the ID from tose deploy, tose status or tose deploy --json.
| Command | What it does | Confirmation |
|---|---|---|
tose deployment wait <id> | Resume waiting for a deployment until it is live and healthy | None |
tose deployment cancel <id> [project] | Cancel a deployment that is still building | --yes |
tose deployment rollback <id> [project] | Roll back to the image of an earlier deployment | --yes |
tose deployment cancel
Cancel a deployment that has not reached deploy yet.
Synopsis
tose deployment cancel <id> [project] --yesBehavior
- Only a deployment that is still in progress (
pending,cloning,building,pushing,deploying) can be cancelled. Any other status is refused with exit code1(CONFLICT). To stop arunningproject, usetose down. - It is destructive, so it follows the same confirmation rules as rollback: a prompt in a terminal (declining exits with code
5), and--yeswithout a terminal or with--json(otherwise exit code4). - It uses the same retry and final-status check as
tose down. A503withRetry-Afteris retried up to 4 times (each wait is theRetry-Aftertime, at most 60 s, or 5 s if absent); after that it fails withOPERATION_FAILED(exit code8, retryable) and says the stop did not happen. A Stop request that runs past about 100 s fails withTIMEOUT(exit code7) and an unknown outcome. - After the stop, the deployment is re-read. If it is not
stopped(for example it endedrunningagain), the command fails withOPERATION_FAILEDand theerror_messageinstead of printingcancelled; if it is stilldeployingit fails withTIMEOUT.
$ tose deployment cancel dep_abc123 --yes
Deployment dep_abc123 cancelled.See tose down for the retry details and exit codes.
tose deployment rollback
Roll the project back to the image of an earlier deployment.
Synopsis
tose deployment rollback <id> [project] --yesArguments
| Argument | Description |
|---|---|
<id> | Deployment to roll back to |
[project] | Optional. Project slug or workspace/project format |
Confirmation
Rollback replaces what is running, so it is a destructive command and never runs without an explicit confirmation:
- In an interactive terminal the CLI shows the target and impact and asks a question that defaults to No. Declining changes nothing and exits with code
5. - Without a terminal, or with
--jsonor--non-interactive, it refuses before sending any mutating request and exits with code4(CONFIRMATION_REQUIRED). Re-run it with--yes. The CLI may still read the target deployment first to check it.
--yes approves only the command it is written on. The API still checks your key's permissions.
# Without a terminal (CI, scripts, agents)
$ tose deployment rollback dep_abc123 --json
$ echo $?
4
$ tose deployment rollback dep_abc123 --yesA failed or in-progress target is refused with exit code 1 (CONFLICT), and an unknown one with exit code 6 (NOT_FOUND), whether or not you pass --yes.
Agents
Rollback is also available through the MCP connector, where it needs your approval in the browser. See Agent access.
Related Commands
tose deploy- Start a deploymenttose status- Find deployment IDstose skills install safe-rollback- Teach an agent the safe rollback flow