You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(cloud-agents): address Harry's review on snapshots page
Apply Harry's four outstanding review comments on PR #105:
- "When to customize snapshots" no longer duplicates the example list
from the intro paragraph. Reframed around user intent rather than
failure modes: outside-bundled-image, repos/files outside the
workspace, and dynamic scripted behavior.
- Replaced the "snapshot a fixed set of repositories or files" bullet
with a broader "dynamic snapshotting behavior" item that calls out
that the script can implement any logic the operator wants, not just
a fixed list.
- The "Script-driven" bullet under "How snapshotting works" now names
OZ_SNAPSHOT_DECLARATIONS_SCRIPT inline, so readers know the script
path is overridable before they reach the Script-driven flow
subsection. The "Static" bullet now names OZ_SNAPSHOT_DECLARATIONS_FILE
for symmetry.
- The OZ_SNAPSHOT_DECLARATIONS_FILE entry in the Environment variables
section now spells out its relationship with
OZ_SNAPSHOT_DECLARATIONS_SCRIPT: when the script var is set Warp
picks a per-run path and exports it to the script; users can also
override the file path themselves so both Warp and the script use a
path they control (or to drive the static, no-script flow).
Co-Authored-By: Oz <oz-agent@warp.dev>
Copy file name to clipboardExpand all lines: src/content/docs/agent-platform/cloud-agents/handoff/snapshots.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,20 +14,20 @@ Warp's bundled cloud agent image ships with a declarations script that snapshots
14
14
15
15
## When to customize snapshots
16
16
17
-
The default snapshotting behavior is sufficient when your cloud agent runs use the bundled cloud agent image and operate entirely inside the assigned workspace. Customize snapshots when:
17
+
The default snapshotting behavior covers the most common case: snapshot every git repository the agent worked on, inside the bundled cloud agent image. Customize snapshots when you need different behavior:
18
18
19
-
***You use a custom Docker base image** that doesn't include the bundled `snapshot-declarations.sh`script.
20
-
***You run cloud agents on a self-hosted Direct backend**or as unmanaged `oz agent run` invocations, where the bundled script isn't on disk.
21
-
***You want to snapshot a fixed set of repositories or files** outside the agent's workspace (for example, a sibling repo that the agent reads but doesn't `cd` into).
19
+
***You're running outside the bundled image** — for example, a custom Docker base image, a self-hosted Direct backend, or unmanaged `oz agent run` invocations — where Warp's default `snapshot-declarations.sh`isn't on disk.
20
+
***You want to snapshot repos or files outside the agent's workspace**— for example, a sibling repo the agent reads but doesn't `cd` into, or a log file the agent writes to `/tmp`.
21
+
***You want dynamic snapshotting behavior** — because the declarations file is generated by a script that Warp runs, you can script any logic you want (filter by git status, dedupe against a baseline, emit a fixed list, etc.) rather than being limited to a static set of paths.
22
22
23
23
If you don't customize snapshots in any of these cases, the run still completes — Warp just uploads nothing, and handoff into the next run starts without the prior session's uncommitted changes.
24
24
25
25
## How snapshotting works
26
26
27
27
There are two ways to tell Warp what to snapshot at the end of a cloud agent run:
28
28
29
-
***Script-driven** (default in the bundled image) - Warp invokes a declarations script that emits one JSON line per repository or file to snapshot. Use this when the set of repos isn't fixed ahead of time (for example, the agent may `git init` a new directory during its work).
30
-
***Static** - You pre-populate the declarations file yourself and skip the script. Use this when the same set of repos and files should be snapshotted on every run.
29
+
***Script-driven** (default in the bundled image) - Warp invokes a declarations script (configured via the `OZ_SNAPSHOT_DECLARATIONS_SCRIPT` environment variable) that emits one JSON line per repository or file to snapshot. Use this when the set of repos isn't fixed ahead of time (for example, the agent may `git init` a new directory during its work) or when you want any other dynamic logic to decide what to snapshot.
30
+
***Static** - You pre-populate the declarations file yourself (at the path given by `OZ_SNAPSHOT_DECLARATIONS_FILE`) and skip the script. Use this when the same set of repos and files should be snapshotted on every run.
31
31
32
32
### Script-driven flow
33
33
@@ -46,7 +46,7 @@ In both flows, snapshotting is automatically enabled for cloud agent runs when c
46
46
## Environment variables
47
47
48
48
***`OZ_SNAPSHOT_DECLARATIONS_SCRIPT`** - Absolute path to the script Warp invokes at the end of each cloud agent run. The bundled cloud agent image sets this automatically. Set it yourself when running outside the bundled image.
49
-
***`OZ_SNAPSHOT_DECLARATIONS_FILE`** - Absolute path to the JSONL file the script writes to (and Warp reads from). Warp sets this to a per-run path by default. Override it only when you want Warp to read from a static, pre-populated declarations file instead of running a script.
49
+
***`OZ_SNAPSHOT_DECLARATIONS_FILE`** - Absolute path to the JSONL file the script writes to (and Warp reads from). When `OZ_SNAPSHOT_DECLARATIONS_SCRIPT` is set, Warp picks a per-run path by default and exports it to the script. Set or override this variable yourself when you want Warp to read from a static, pre-populated declarations file instead of running a script, or whenever you want both Warp and the script to use a specific path you control.
0 commit comments