> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sandbox checkpoint

> Create a restore-point checkpoint of an app's remote sandbox

Save a restore point for an app's [sandbox](/developers/app-code/local-development/bring-your-own-agent). A checkpoint appears in the app's version history in the Base44 app editor, where you can restore the app to that state later. Use it to mark a known-good state before or after a set of risky changes.

Any changes still waiting to be saved are committed first, so the checkpoint always captures your latest code rather than a stale version. If that flush can't be confirmed, the command fails with `COMMIT_FLUSH_PENDING` instead of checkpointing a stale state. Wait a moment and run it again.

`sandbox` commands don't require a local project. Target an app by passing [`--app-id`](/developers/references/cli/commands/introduction#select-a-target-app), setting the `BASE44_APP_ID` environment variable, or running the command from a linked project if you have one.

<Note>
  This command needs the `sandbox:write` permission. The CLI requests it when you sign in, and an existing session cannot gain it afterwards. If the command fails with an authorization error, run [`base44 login`](/developers/references/cli/commands/login) again to start a session that has it.
</Note>

## Usage

```bash theme={null}
base44 sandbox checkpoint
```

## Flags

| Flag            | Description                                                                                                                                                                   |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--app-id <id>` | Target the specified app. Defaults to the app linked in the current project. See [Select a target app](/developers/references/cli/commands/introduction#select-a-target-app). |
| `--name <name>` | Title for the checkpoint, up to 200 characters. Defaults to a generated title.                                                                                                |
| `--json`        | Keep stdout to just the JSON result, without the interactive status line. See [JSON output](/developers/references/cli/commands/introduction#json-output).                    |

## Output

The command returns JSON:

```
{
  "checkpointId": "68a1f0c4e2b91a0012d4c7fa",
  "name": "before refactor",
  "gitCommitHash": "3f9c1ab7d2e845c0b6f31e29a7d4c8b501ae6f32"
}
```

| Field           | Description                                                            |
| --------------- | ---------------------------------------------------------------------- |
| `checkpointId`  | ID of the new checkpoint.                                              |
| `name`          | The checkpoint title. `null` when no title could be set.               |
| `gitCommitHash` | Commit the checkpoint is anchored to. `null` when it is not available. |

## See also

* [Bring your own agent](/developers/app-code/local-development/bring-your-own-agent): How the sandbox works, and what you can change in it
* [`sandbox edit`](/developers/references/cli/commands/sandbox-edit): Apply exact string replacements to a file
* [`sandbox write`](/developers/references/cli/commands/sandbox-write): Create a new file in the sandbox
* [`sandbox run`](/developers/references/cli/commands/sandbox-run): Run a shell command in the sandbox
