---
title: "checkpoint"
description: "Save state for potential recovery"
canonical: "https://acs.synapti.ai/capabilities/checkpoint/"
last_updated: "2026-11-26T14:43:03+01:00"
---

# checkpoint

Save state for potential recovery

Generated from [schemas/capability_ontology.yaml](https://github.com/synaptiai/agent-capability-standard/blob/main/schemas/capability_ontology.yaml), [skills/checkpoint/SKILL.md](https://github.com/synaptiai/agent-capability-standard/blob/main/skills/checkpoint/SKILL.md) at commit 18c38b74ac21. Ontology version 2.2.0.

Layer: [VERIFY](https://acs.synapti.ai/layers/verify/index.md)

## Safety

| Property | Value |
| --- | --- |
| Risk | Low |
| Changes state | Yes |
| Needs checkpoint | No |
| Needs approval | No |
| Overridable | No |
| Blocked from autonomy | No |

**Figure: Ordering rules for checkpoint in a workflow.** In a workflow, it must run before mutate, send and rollback (V102); and where the workflow has mutate and send, checkpoint must come before them (V102).

| Where | Capability | Rule | Enforcement | Diagnostic |
| --- | --- | --- | --- | --- |
| After checkpoint | [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | `requires` | MUST | V102 |
| After checkpoint | [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | `precedes` | MUST | V102 |
| After checkpoint | [`send`](https://acs.synapti.ai/capabilities/send/index.md) | `requires` | MUST | V102 |
| After checkpoint | [`send`](https://acs.synapti.ai/capabilities/send/index.md) | `precedes` | MUST | V102 |
| After checkpoint | [`rollback`](https://acs.synapti.ai/capabilities/rollback/index.md) | `requires` | MUST | V102 |

## Relationships

**Figure: Relationships of checkpoint: 7 relationships with 5 capabilities.** checkpoint has 7 relationships with 5 capabilities: 1 with edges into it, 3 with edges out of it, and 1 joined to it only by edges that run both ways.

| Capability | Row | Relationships |
| --- | --- | --- |
| [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | Edges out of checkpoint | `requires` (out of), `precedes` (out of) |
| [`send`](https://acs.synapti.ai/capabilities/send/index.md) | Edges out of checkpoint | `requires` (out of), `precedes` (out of) |
| [`rollback`](https://acs.synapti.ai/capabilities/rollback/index.md) | Edges out of checkpoint | `requires` (out of) |
| [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md) | Edges into checkpoint | `enables` (into) |
| [`persist`](https://acs.synapti.ai/capabilities/persist/index.md) | Either way | `alternative_to` (both ways) |

- `requires`: Must run before [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md), [`send`](https://acs.synapti.ai/capabilities/send/index.md), [`rollback`](https://acs.synapti.ai/capabilities/rollback/index.md)
- `enables`: Unlocked by [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md)
- `precedes`: Comes before, when both are present [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md), [`send`](https://acs.synapti.ai/capabilities/send/index.md)
- `alternative_to`: Can substitute for [`persist`](https://acs.synapti.ai/capabilities/persist/index.md)

## Contract

**Figure: Contract of checkpoint: 3 inputs (1 required), 12 outputs.** checkpoint takes 3 inputs, 1 required (filled pin) and 2 optional (hollow pin), and returns 12 outputs. The tables below list every field.

### Inputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `scope` | string | Yes | What to capture, in the host's naming (paths or patterns, keys, resource identifiers, e.g. separated by white space); '*' for everything the host can restore (Standard v1.2 §4.4.1) |
| `label` | string | No | Checkpoint name |
| `metadata` | object | No | Additional metadata |

### Outputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checkpoint_id` | string | Yes | Checkpoint identifier |
| `timestamp` | string | No | Format: date-time |
| `size` | integer | No | Checkpoint size |
| `mechanism` | string | No | How the checkpoint was taken, e.g. vcs_snapshot, file_copy, store_snapshot, savepoint, or an x- name (Standard v1.2 §4.4.1) |
| `captured` | array of string | No | What the checkpoint holds, in the host's naming |
| `excluded` | array of string | No | What the scope named that the checkpoint does not hold, such as a secret the host will not copy or the host's own records, which no checkpoint holds (Standard v1.2 §4.4.1) |
| `digest` | string | No | Digest of the captured content as <algorithm>:<lowercase hex>, e.g. sha256 followed by the hex digest, which a rollback's verification compares |
| `expires_at` | string | No | When the host may discard the content, after which a rollback cannot restore it; not its validity for authorising a step (Standard v1.2 §5.2.2) Format: date-time |
| `evidence_anchors` | array of Anchor (or deprecated string or object) | Yes | What the output is based on, as evidence anchors (Standard v1.2 §6.5). An empty list grounds nothing, and the output is then marked inferred (§3.1). |
| `confidence` | number | No | The producer's probability that the output's claim is correct, self-reported; given when the output is inferred (Standard v1.2 §3.1, §4.1.1) From 0 to 1 |
| `inference_method` | string | No | How the output was reached when it is not grounded in evidence; with confidence it marks the output inferred (Standard v1.2 §3.1, §4.1.1). A producer should use model_knowledge, deduction, induction, abduction, analogy, statistical, simulation, assumption or an x- vendor value; a grounding policy (§5.20) requires one of them. |
| `uncertainty` | Uncertainty | No | The uncertainty of the output's principal value; its confidence equals the output's confidence (Standard v1.2 §4.1.1) |

The skill returns 14 fields: 10 are in checkpoint's output contract (2 required) and 4 are the skill's own, outside the contract; it leaves out 2 contract fields (inference_method, uncertainty).

| Field of the skill's output | In the output contract |
| --- | --- |
| `checkpoint_id` | Yes, required |
| `timestamp` | Yes, optional |
| `size` | Yes, optional |
| `mechanism` | Yes, optional |
| `captured` | Yes, optional |
| `excluded` | Yes, optional |
| `digest` | Yes, optional |
| `expires_at` | Yes, optional |
| `restore_command` | No, the skill's own |
| `pre_mutation_state` | No, the skill's own |
| `next_safe_actions` | No, the skill's own |
| `confidence` | Yes, optional |
| `evidence_anchors` | Yes, required |
| `assumptions` | No, the skill's own |
| `inference_method` | Yes, but the skill leaves it out |
| `uncertainty` | Yes, but the skill leaves it out |

## Used in workflows

**Figure: checkpoint in workflows.** 10 workflows use checkpoint, in 10 steps in all; its steps are the squares in an ink ring, and the key under the strips names the other squares.

- [`debug_code_change`](https://acs.synapti.ai/workflows/debug-code-change/index.md): step 7
- [`digital_twin_sync_loop`](https://acs.synapti.ai/workflows/digital-twin-sync-loop/index.md): step 15
- [`model_deployment`](https://acs.synapti.ai/workflows/model-deployment/index.md): step 3
- [`patient_monitoring`](https://acs.synapti.ai/workflows/patient-monitoring/index.md): step 11
- [`clinical_alert_triage`](https://acs.synapti.ai/workflows/clinical-alert-triage/index.md): step 10
- [`handoff_preparation`](https://acs.synapti.ai/workflows/handoff-preparation/index.md): step 12
- [`quality_control_loop`](https://acs.synapti.ai/workflows/quality-control-loop/index.md): step 8
- [`supply_chain_sync`](https://acs.synapti.ai/workflows/supply-chain-sync/index.md): step 10
- [`task_delegation`](https://acs.synapti.ai/workflows/task-delegation/index.md): step 7
- [`communication_drafting`](https://acs.synapti.ai/workflows/communication-drafting/index.md): step 9

## Claude Code skill

**Figure: What the checkpoint skill's tools can do, against the ontology.** The skill may use 3 tools: 1 only read, 1 run commands and 1 change files; the ontology marks checkpoint as changing state, and Bash and Edit can make the change.

| What they can do | Tools |
| --- | --- |
| Only read | `Read` |
| Run commands, which can change state | `Bash` |
| Change files | `Edit` |

**Figure: The field names each step of the checkpoint procedure uses.** 4 of the procedure's 6 steps use the name of an input or output field of the checkpoint skill as a word; 10 output fields of 14 are used by no step (checkpoint_id, timestamp, size, digest, expires_at, pre_mutation_state, next_safe_actions, confidence, evidence_anchors, assumptions).

| Step | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. Identify scope | `scope` | `captured`, `excluded` |
| 2. Select the mechanism | `scope` | `mechanism` |
| 3. Capture | `scope` | `excluded` |
| 4. Generate the restore command |  | `restore_command` |
| 5. Ground claims |  |  |
| 6. Format output |  |  |

Both examples of the skill write out the same 13 of its 14 output fields, and neither writes out size.

**Figure: The field names each verification check of the checkpoint skill uses.** 4 of the 4 checks use the name of an input or output field as a word; 9 output fields of 14 are named by no check (timestamp, size, mechanism, expires_at, restore_command, pre_mutation_state, next_safe_actions, confidence and assumptions).

| Check | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. State Assertion: digest can be recomputed from the captured content and matches |  | `captured`, `digest` |
| 2. Scope Complete: everything in scope is in captured or excluded | `scope` | `captured`, `excluded` |
| 3. Nothing Secret Captured: no secret-bearing file is in captured |  | `captured` |
| 4. Evidence Grounding: checkpoint_id appears in evidence_anchors |  | `checkpoint_id`, `evidence_anchors` |

**Figure: The neighbours the skill lists for checkpoint, checked against the ontology and the catalogs.** The skill lists 7 capabilities as common neighbours of checkpoint; 4 of them have an edge with it in the ontology, and 4 run next to it, in that order, in a catalog workflow (constrain most often, 2 times). Under each tile, an edge reads from its source to its target, with checkpoint's symbol in its place: "requires Ch" is a requires edge from the tile's capability to checkpoint, so the tile's capability must run before checkpoint; "Ch precedes" is a precedes edge from checkpoint to the tile's capability.

| Listed as | Capability | Ontology edge | Next to it in a workflow |
| --- | --- | --- | --- |
| commonly follows | [`plan`](https://acs.synapti.ai/capabilities/plan/index.md) | none | 1 times |
| commonly follows | [`critique`](https://acs.synapti.ai/capabilities/critique/index.md) | none | never |
| commonly follows | [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md) | `enables` | 2 times |
| commonly precedes | [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | `requires` (into it), `precedes` (into it) | 1 times |
| commonly precedes | [`execute`](https://acs.synapti.ai/capabilities/execute/index.md) | none | 2 times |
| commonly precedes | [`send`](https://acs.synapti.ai/capabilities/send/index.md) | `requires` (into it), `precedes` (into it) | never |
| commonly precedes | [`rollback`](https://acs.synapti.ai/capabilities/rollback/index.md) | `requires` (into it) | never |

### Intent

Execute **checkpoint** to take a copy of the state within a scope, kept where the host keeps it, from which that state can be restored before a mutating operation (STANDARD v1.2 §4.4.1). This is the foundation of safe agentic execution: a later `rollback` returns what the checkpoint captured to its saved state.

A checkpoint restores state, not effects: it cannot recall a transmission a later `send` makes (§4.4.2), and it reaches only what it captured. It never captures the record of what happened (`.claude/`, which holds the plugin's audit log, `.audit/`, where earlier releases' skills logged, and the host's checkpoint and approval state): a scope that names those leaves them out and lists them in `excluded`.

**Success criteria:**
- The state in scope is captured, and what was left out is listed in `excluded`
- The restore point is recorded (a commit id, a manifest, a savepoint name)
- A `digest` of the captured content lets a rollback verify its restore

**Compatible schemas:**
- `schemas/output_schema.yaml`

### Inputs

| Parameter | Required | Type | Description |
|-----------|----------|------|-------------|
| `scope` | Yes | string | What to capture, in the host's naming (paths or patterns, keys, resource identifiers, separated by white space); `*` for everything the host can restore |
| `label` | No | string | Checkpoint name |
| `metadata` | No | object | Additional metadata |

Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).

### Procedure

1) **Identify scope**: Determine exactly what needs to be captured
   - List the files, records or resources the upcoming change will touch
   - Include related configuration or state
   - Leave out what holds secrets (`.env`, keys, credentials): list it in `excluded`

2) **Select the mechanism** by what is in scope (reported as `mechanism`):
   - `vcs_snapshot`: tracked files in a version-control working tree
   - `file_copy`: files copied where the host keeps checkpoint content
   - `store_snapshot`: a key-value or document store's snapshot
   - `savepoint`: a database transaction savepoint
   - a provider snapshot (a volume, a VM image) as an `x-` name
   Keep checkpoint content where the host keeps it, outside the files in scope.

3) **Capture**. The git form (`vcs_snapshot`), each a separate plain Bash call (the safety layer counts exactly a plain `git stash create` as `checkpoint`):
   1. `git stash create "checkpoint:<id>"` saves the tracked state as an unreferenced stash commit and prints its sha; **an empty output means a clean tree**
   2. On a clean tree, `git rev-parse HEAD`: the restore point is `HEAD` (record `restore_kind`: `stash` or `head`)
   3. `git ls-files --others --exclude-standard -- <paths>`: untracked files, which the stash does not capture, go in `excluded`
   Under the plugin's hooks this works only where Claude Code's strict sandbox is verified (hooks README, "The strict sandbox"); otherwise it is refused with F501.
   Never `git stash store` or `git update-ref`: either is a gated `mutate` that names a commit the caller chooses. For `file_copy`, copy each file with a manifest of its SHA-256 into a private directory outside the scope.

4) **Generate the restore command**: how to roll back (skill-level aid, not contract)
   - For `vcs_snapshot`: the `rollback` skill's `git restore --source=<sha>` form
   - For `file_copy`: the copy back from the manifest

5) **Ground claims**: Attach evidence of the checkpoint
   - The checkpoint's own record: `{ref: "checkpoint:<id>", kind: record}`
   - The capture command: `tool:bash:<command>`

6) **Format output**: Return the checkpoint's report per contract

### Output Contract

Return a structured object:

```yaml
checkpoint_id: string  # Unique identifier (e.g., "chk_20240115_143022_abc123")
timestamp: string  # ISO 8601 date-time the checkpoint was taken
size: integer  # Size of the captured content in bytes (optional)
mechanism: vcs_snapshot | file_copy | store_snapshot | savepoint | x-...  # How it was taken (§4.4.1)
captured: array[string]  # What it holds, in the host's naming
excluded: array[string]  # What the scope named that it does not hold (secrets, untracked files, the host's own records)
digest: string  # "sha256:<hex>" of the captured content, which a rollback's verification compares
expires_at: string | null  # When the host may discard the content (retention), not its validity
restore_command: string  # Skill-level aid: how to restore
pre_mutation_state:
  summary: string  # Skill-level aid: human-readable state summary
next_safe_actions: array[string]  # What can now safely proceed
confidence: number  # probability that the checkpoint restores the state it reports (§4.1.1)
evidence_anchors: [{ref: "checkpoint:<checkpoint_id>", kind: record}, {ref: "tool:bash:...", kind: tool}, {ref: "file:...", kind: file}]  # the checkpoint's own record grounds the output (STANDARD v1.2 §3.1)
assumptions: []
```

#### Field Definitions

| Field | Type | Description |
|-------|------|-------------|
| `checkpoint_id` | string | Unique identifier for this checkpoint (workflows bind `${<step>.checkpoint_id}`) |
| `timestamp` | string | ISO 8601 date-time the checkpoint was taken |
| `size` | integer | Size of the captured content in bytes (optional) |
| `mechanism` | string | `vcs_snapshot`, `file_copy`, `store_snapshot`, `savepoint`, or an `x-` name (§4.4.1) |
| `captured` | array | What the checkpoint holds |
| `excluded` | array | What the scope named that it does not hold |
| `digest` | string | Digest of the captured content, `<algorithm>:<lowercase hex>` |
| `expires_at` | string | When the content may be discarded; a used or no longer valid checkpoint can be restored until then |
| `restore_command` | string | Skill-level aid: how to restore |
| `next_safe_actions` | array | Actions that can now safely proceed |
| `confidence` | number | Probability, 0.0-1.0, that the checkpoint restores the state it reports (§4.1.1) |
| `evidence_anchors` | array of evidence anchors (§6.5) | Proof of the checkpoint |
| `assumptions` | array | Explicit assumptions (e.g., "git available") |

Validity and retention differ (§4.4.1): validity (§5.2.2) limits what a checkpoint authorises, one change, while it is fresh; retention limits what it can restore. A checkpoint that was used up or is no longer valid can still be restored while its content is kept.

### Examples

#### Example 1: Git Checkpoint of a Dirty Tree

**Input:**
```yaml
scope: "src/api/handlers tests/test_handlers.py"
label: "Before refactoring API handlers"
```

**Output:**
```yaml
checkpoint_id: "chk_20240115_143022_a7b3c9"
timestamp: "2024-01-15T14:30:22Z"
mechanism: vcs_snapshot
captured:
  - "src/api/handlers/user.py"
  - "src/api/handlers/auth.py"
  - "tests/test_handlers.py"
excluded:
  - "src/api/handlers/scratch.py"
digest: "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
expires_at: null
restore_command: "git restore --source=4f1d2c3b5a6978877665544332211009988aabbc --worktree -- src/api/handlers tests/test_handlers.py && git restore --source=4f1d2c3b5a6978877665544332211009988aabbc^2 --staged -- src/api/handlers tests/test_handlers.py"
pre_mutation_state:
  summary: "3 tracked files with uncommitted changes; restore point is the stash commit"
next_safe_actions:
  - "mutate: Modify files in scope"
confidence: 1.0
evidence_anchors:
  - {ref: "checkpoint:chk_20240115_143022_a7b3c9", kind: record}
  - {ref: "tool:bash:git stash create checkpoint:chk_20240115_143022_a7b3c9", kind: tool}
  - {ref: "tool:bash:git ls-files --others --exclude-standard -- src/api/handlers tests/test_handlers.py", kind: tool}
assumptions:
  - "The untracked scratch.py is not needed to restore the handlers"
```

**Evidence pattern:** the stash commit `git stash create` printed (the restore point), and the untracked files it does not capture, listed in `excluded`.

---

#### Example 2: Git Checkpoint of a Clean Tree

**Input:**
```yaml
scope: "config/production.yaml"
label: "Before config migration"
```

`git stash create` printed nothing: the tree is clean, so `git rev-parse HEAD` gives the restore point.

**Output:**
```yaml
checkpoint_id: "chk_20240115_150000_config"
timestamp: "2024-01-15T15:00:00Z"
mechanism: vcs_snapshot
captured:
  - "config/production.yaml"
excluded: []
digest: "sha256:9b74c9897bac770ffc029102a200c5de0b1d5e5d3c1b0e2f4a6c8e0a2b4c6d8e"
expires_at: null
restore_command: "git restore --source=1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d --staged --worktree -- config/production.yaml"
pre_mutation_state:
  summary: "1 tracked file, unchanged since HEAD"
next_safe_actions:
  - "mutate: Apply config migration"
confidence: 0.95
evidence_anchors:
  - {ref: "checkpoint:chk_20240115_150000_config", kind: record}
  - {ref: "tool:bash:git stash create checkpoint:chk_20240115_150000_config", kind: tool}
  - {ref: "tool:bash:git rev-parse HEAD", kind: tool}
assumptions:
  - "No commit is made between the checkpoint and the change"
```

### Verification

Apply the following verification patterns:

- [ ] **State Assertion**: `digest` can be recomputed from the captured content and matches
- [ ] **Scope Complete**: everything in scope is in `captured` or `excluded`
- [ ] **Nothing Secret Captured**: no secret-bearing file is in `captured`
- [ ] **Evidence Grounding**: checkpoint_id appears in evidence_anchors

**Verification tools:** Bash (for hash verification), Read (for manifest)

### Safety Constraints

- `mutation`: true (creates checkpoint artifacts)
- `requires_checkpoint`: false (this IS the checkpoint operation)
- `requires_approval`: false
- `risk`: low

**Capability-specific rules:**
- NEVER skip checkpoint before mutate or send (CRITICAL)
- NEVER delete checkpoint content until explicitly requested
- ALWAYS verify the capture immediately after creation
- Do not checkpoint sensitive files (.env, credentials): exclude them and list them in `excluded`
- Never capture `.claude/` (the plugin's audit log) or `.audit/` (earlier releases' logs), or the host's checkpoint, approval or idempotency state (§4.4.1)
- Keep checkpoint content where the host keeps it, outside the files in scope
- Include the reason in the checkpoint's label for the audit trail

### Composition Patterns

**Commonly follows:**
- `plan` - After creating a plan, checkpoint before execution
- `critique` - After reviewing risks, checkpoint before proceeding
- `constrain` - After policy check passes, checkpoint before mutation

**Commonly precedes:**
- `mutate` - REQUIRED: Never mutate without prior checkpoint (CAVR pattern)
- `execute` - Checkpoint before a step that raises `requires_checkpoint`
- `send` - REQUIRED: Checkpoint before external communications; it restores the agent's own state, not the transmission (§4.4.2)
- `rollback` - REQUIRED: Rollback restores to a checkpoint

**Anti-patterns:**
- CRITICAL: Never call `mutate` or `send` without prior `checkpoint`
- CRITICAL: Never call `rollback` without valid checkpoint reference
- Never checkpoint after mutation has started
- Never delete checkpoint before verify confirms success

**Workflow references:**
- See `reference/composition_patterns.md#checkpoint-act-verify-rollback` for CAVR pattern
- See `reference/composition_patterns.md#debug-code-change` for checkpoint placement
- See `reference/composition_patterns.md#digital-twin-sync-loop` for checkpoint in loops
