Retention and archive
Keep the spaces you care about for as long as you want, and let Marshal clean up the rest on a schedule your admin controls. A stopped space you own stays until you act on it. Archived spaces and finished run spaces follow two clear timers, so disks and backups never pile up.
What you can do with it
- Clear your list without losing work. Archive a space you finished last sprint. It leaves your Spaces list, keeps its saved workspace, and you can restore it any time before its countdown ends.
- Keep a workspace after the space is gone. Delete a space but tick Retain workspace. The saved files stay as a named volume, and you can fork a new space from them next month.
- Pay only for the disk you use. An admin sets how long a finished run keeps its disk. A short window frees the disk soon after each run, while the backup stays, so the run can still be continued with its files.
See it end to end: Run a fleet of agents in parallel.
How it works
| Space | What happens to it |
|---|---|
| Your space, stopped | Kept with its saved workspace until you archive or delete it. Marshal never archives or deletes it for you. |
| Your space, archived | Deleted after Archived Space Retention (days). |
| A run’s space, finished | Archived after Finished Run Disk Retention (hours), then deleted after Archived Space Retention (days). |
Archiving and deleting do different things:
- Archive frees the space’s disk and keeps its workspace backup in your org’s storage. Restore brings the space back to
stopped, ready to resume. The first resume after a restore downloads the backup, so it takes longer than a usual resume. To fork an archived space, restore it first. - Delete removes the space and its workspace backup, unless you retained the workspace.
A run’s space, step by step
With the default settings, a finished run’s space goes through this timeline:
About 2 hours after the run ends, its space is archived: the disk is freed and the backup is kept. 7 days later, the space is deleted and the backup is removed.
What this means for Continue on a finished run:
- The conversation is kept for 30 days after the run ends.
- The files are kept until the run’s space is deleted, 7 days after it is archived by default.
- Inside both windows, Continue brings back the conversation and the files. After the space is deleted and before the 30 days pass, Continue brings back the conversation and starts with an empty working tree.
See The run page.
Archive, restore and delete
You can archive a space that is ready, running or stopped. A running space is stopped first. Archived spaces are on the Archive page, each with a countdown such as “3d left”.
marshal spaces archive <id>
marshal spaces restore <id>
marshal spaces resume <id>
marshal spaces delete <id>restore moves the space to stopped. Run resume after it to start the space. delete asks you to confirm unless you pass --yes.
To keep the files when you delete, use Delete in the web and tick Retain workspace. The checkbox shows when the space has a saved volume. The volume gets a name and stays after the delete. Automatic deletion never removes a retained volume. Manage retained volumes under Settings > Space Storage.
Configure it
Both settings are under Settings > Configuration, in the Spaces group. Org owners and admins can change them.
| Setting | Default | Range | What it controls |
|---|---|---|---|
| Finished Run Disk Retention (hours) | 2 | 1 to 720 | How long a finished run’s space keeps its disk before Marshal archives it. Archiving frees the disk within about a minute and keeps the backup. |
| Archived Space Retention (days) | 7 | 1 to 365 | How long an archived space is kept before it is deleted. Deleting removes the workspace backup. This applies to your spaces and to run spaces. |
Lower the disk window when every compute class uses a persistent disk, because each finished run holds its full disk for that long. Raise the archive window when people continue runs days later and need the files.
Edge cases
- The retention check runs every hour. A window can end up to an hour later than its value.
- The disk timer starts only when the run has finished. A parked run, which waits for an answer, keeps its space.
- A run’s space that ends in
errormoves tostoppedafter 1 hour, then follows the same timeline. - A run started with
marshal run --keep-on-failurekeeps its space up for 24 hours after a failed run, so you can attach and look around. - You can delete an archived space at once. You do not have to wait for its countdown.
Try it
Open Archive in the sidebar to see your archived spaces and how long each has left. Or archive one now:
marshal spaces archive <id>