Save a sandbox’s filesystem, restore it, or branch it
A checkpoint saves a sandbox’s filesystem so you can start new sandboxes from it later, or fork a running one to branch your work. It captures the sandbox’s root filesystem only — data on mounted volumes is never included. Checkpoints capture files only: processes start fresh and nothing in memory carries over.A checkpoint is usable once it reaches DURABLE. From then on it outlives its source sandbox. Checkpoint storage is billed separately.
Keep the source sandbox alive until the checkpoint is DURABLE. If it’s
deleted or hits its timeout first, the checkpoint is lost.
The quickest way to branch a running sandbox. It checkpoints, waits for DURABLE, and starts a new sandbox from it:
prime sandbox fork sbx_123 --name experiment-branch --yes
The fork inherits the source’s CPU, memory, and timeout unless you pass --cpu-cores, --memory-gb, or --timeout-minutes. Use --wait-timeout (seconds) to cap how long it waits for the checkpoint.
# 1. Create a checkpoint (prints its ID)prime sandbox checkpoint create sbx_123# 2. Poll until its state is DURABLEprime sandbox checkpoint list sbx_123 --checkpoint-id <checkpoint-id># 3. Restore into a new sandboxprime sandbox checkpoint restore <checkpoint-id> --name restored-workspace --yes
The image and disk size come from the checkpoint, so leave out docker_image and disk_size_gb in the SDK. Everything else (resources, env vars, timeouts) works as usual; the CLI restore accepts --cpu-cores, --memory-gb, --timeout-minutes, and --team-id.wait_for_checkpoint returns once the checkpoint is DURABLE. It raises RuntimeError if the checkpoint fails and TimeoutError if the wait runs out. A timeout doesn’t mean the checkpoint failed, so check it with get_checkpoint before deleting the source sandbox. list_checkpoints(sandbox_id) lists a sandbox’s checkpoints.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Prime Intellect Docs","colors":{"primary":"#9946FC","light":"#ffffff","dark":"#121212"},"logo":{"light":"https://mintcdn.com/primeintellect/X3F2tnEstSGMOi8f/logo/logo-dark-font.svg?fit=max\u0026auto=format\u0026n=X3F2tnEstSGMOi8f\u0026q=85\u0026s=4530d2da1baa9b91284a28d341a96d41","dark":"https://mintcdn.com/primeintellect/X3F2tnEstSGMOi8f/logo/logo-light-font.svg?fit=max\u0026auto=format\u0026n=X3F2tnEstSGMOi8f\u0026q=85\u0026s=692102cbfd35d0ffc53889dd563b2bba"},"favicon":"https://mintcdn.com/primeintellect/V8nr4KkPva3ooU45/favicon.svg?fit=max\u0026auto=format\u0026n=V8nr4KkPva3ooU45\u0026q=85\u0026s=0605a1bf3a6c6f9dc5f446cb0935f9f3","navbar":{"links":[{"href":"mailto:contact@primeintellect.ai","label":"Support"}],"primary":{"type":"button","label":"Home","href":"https://app.primeintellect.ai"}},"footer":{"socials":{"x":"https://x.com/PrimeIntellect","github":"https://github.com/PrimeIntellect-ai","linkedin":"https://www.linkedin.com/company/primeintellect-ai"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Join Discord","icon":"discord","href":"https://discord.gg/ZTFydGWPKj"},{"anchor":"Twitter","icon":"twitter","href":"https://twitter.com/PrimeIntellect"},{"anchor":"Blog","icon":"newspaper","href":"https://www.primeintellect.ai/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"primeintellect","hasAudioNarration":false,"actualSubdomain":"primeintellect","customDomains":["docs.primeintellect.ai"],"gitSource":{"type":"github","owner":"primeintellect-ai","repo":"public-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af130444b37965472d6f42f","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"API","count":131},{"language":"default","tag":"Platform","count":73},{"language":"default","tag":"Libraries","count":23},{"language":"default","tag":"Model Factory","count":18},{"language":"default","tag":"training","count":18},{"language":"default","tag":"Compute","count":16},{"language":"default","tag":"Traces API","count":16},{"language":"default","tag":"Sandboxes","count":13},{"language":"default","tag":"Traces","count":13},{"language":"default","tag":"Training","count":12}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@primeintellect.ai","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"sandboxes/checkpoints","slug":"/sandboxes/checkpoints","pageMetadata":{"title":"Checkpoints \u0026 Forking","description":"Save a sandbox's filesystem, restore it, or branch it","href":"/sandboxes/checkpoints"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Save a sandbox’s filesystem, restore it, or branch it\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A checkpoint saves a sandbox’s filesystem so you can start new sandboxes from it later, or fork a running one to branch your work. It captures the sandbox’s root filesystem only — data on mounted `,_jsx(_components.a,{href:`/sandboxes/volumes`,children:`volumes`}),` is never included. Checkpoints capture `,_jsx(_components.strong,{children:`files only`}),`: processes start fresh and nothing in memory carries over.`]}),`\n`,_jsxs(_components.p,{children:[`A checkpoint is usable once it reaches `,_jsx(_components.code,{children:`DURABLE`}),`. From then on it outlives its source sandbox. Checkpoint storage is `,_jsx(_components.a,{href:`/sandboxes/overview#pricing`,children:`billed separately`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Keep the source sandbox alive until the checkpoint is `,_jsx(_components.code,{children:`DURABLE`}),`. If it’s\ndeleted or hits its timeout first, the checkpoint is lost.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`fork`,children:`Fork`}),`\n`,_jsxs(_components.p,{children:[`The quickest way to branch a running sandbox. It checkpoints, waits for `,_jsx(_components.code,{children:`DURABLE`}),`, and starts a new sandbox from it:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`prime`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sandbox`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` fork`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sbx_123`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` experiment-branch`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --yes`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The fork inherits the source’s CPU, memory, and timeout unless you pass `,_jsx(_components.code,{children:`--cpu-cores`}),`, `,_jsx(_components.code,{children:`--memory-gb`}),`, or `,_jsx(_components.code,{children:`--timeout-minutes`}),`. Use `,_jsx(_components.code,{children:`--wait-timeout`}),` (seconds) to cap how long it waits for the checkpoint.`]}),`\n`,_jsx(Heading,{level:`2`,id:`checkpoint-and-restore`,children:`Checkpoint and restore`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`CLI`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Create a checkpoint (prints its ID)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`prime`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sandbox`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` checkpoint`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sbx_123`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Poll until its state is DURABLE`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`prime`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sandbox`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` checkpoint`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sbx_123`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --checkpoint-id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`checkpoint-i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`d`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Restore into a new sandbox`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`prime`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sandbox`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` checkpoint`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` restore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`checkpoint-i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`d`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` restored-workspace`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --yes`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`checkpoint `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.checkpoint(sandbox_id)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.wait_for_checkpoint(checkpoint.id, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`timeout_seconds`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`300`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`restored `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CreateSandboxRequest(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"restored-workspace\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`checkpoint_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`checkpoint.id)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.wait_for_creation(restored.id)`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`The image and disk size come from the checkpoint, so leave out `,_jsx(_components.code,{children:`docker_image`}),` and `,_jsx(_components.code,{children:`disk_size_gb`}),` in the SDK. Everything else (resources, env vars, timeouts) works as usual; the CLI `,_jsx(_components.code,{children:`restore`}),` accepts `,_jsx(_components.code,{children:`--cpu-cores`}),`, `,_jsx(_components.code,{children:`--memory-gb`}),`, `,_jsx(_components.code,{children:`--timeout-minutes`}),`, and `,_jsx(_components.code,{children:`--team-id`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`wait_for_checkpoint`}),` returns once the checkpoint is `,_jsx(_components.code,{children:`DURABLE`}),`. It raises `,_jsx(_components.code,{children:`RuntimeError`}),` if the checkpoint fails and `,_jsx(_components.code,{children:`TimeoutError`}),` if the wait runs out. A timeout doesn’t mean the checkpoint failed, so check it with `,_jsx(_components.code,{children:`get_checkpoint`}),` before deleting the source sandbox. `,_jsx(_components.code,{children:`list_checkpoints(sandbox_id)`}),` lists a sandbox’s checkpoints.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Checkpoints \u0026 Forking","description":"Save a sandbox's filesystem, restore it, or branch it","href":"/sandboxes/checkpoints"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Fork","slug":"fork","depth":2,"children":[]},{"title":"Checkpoint and restore","slug":"checkpoint-and-restore","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/primeintellect/888b2eb94cd2e0ca/script.js","/_mintlify/custom/primeintellect/e3040f43d72452c7/proxy.js"],"subdomain":"primeintellect","siteName":"Prime Intellect Docs","title":"Checkpoints \u0026 Forking - Prime Intellect Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-20T17:30:20.980Z","originalFileLocation":"sandboxes/checkpoints.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Save a sandbox\u0026#x27;s filesystem, restore it, or branch it\">\u003cmeta data-mint-head name=\"application-name\" content=\"Prime Intellect Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/primeintellect/Kk6EAHv3Qhta4r9y/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/primeintellect/Kk6EAHv3Qhta4r9y/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/primeintellect/Kk6EAHv3Qhta4r9y/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/primeintellect/Kk6EAHv3Qhta4r9y/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/primeintellect/Kk6EAHv3Qhta4r9y/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/primeintellect/Kk6EAHv3Qhta4r9y/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/primeintellect/Kk6EAHv3Qhta4r9y/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/primeintellect/Kk6EAHv3Qhta4r9y/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/primeintellect/Kk6EAHv3Qhta4r9y/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Checkpoints \u0026amp; Forking - Prime Intellect Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Save a sandbox\u0026#x27;s filesystem, restore it, or branch it\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Prime Intellect Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.primeintellect.ai/sandboxes/checkpoints\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://primeintellect.mintlify.site/_mintlify/api/og/v2?division=Sandboxes\u0026amp;title=Checkpoints+%26+Forking\u0026amp;description=Save+a+sandbox%27s+filesystem%2C+restore+it%2C+or+branch+it\u0026amp;theme=6d7a5e449203cf606ab9cc22\u0026amp;signature=6f0e8dcbeeb5a5fe10db245f1bd2cda5abd27c42a62520f23f8be55ed36673ae\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Checkpoints \u0026amp; Forking - Prime Intellect Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Save a sandbox\u0026#x27;s filesystem, restore it, or branch it\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://primeintellect.mintlify.site/_mintlify/api/og/v2?division=Sandboxes\u0026amp;title=Checkpoints+%26+Forking\u0026amp;description=Save+a+sandbox%27s+filesystem%2C+restore+it%2C+or+branch+it\u0026amp;theme=6d7a5e449203cf606ab9cc22\u0026amp;signature=6f0e8dcbeeb5a5fe10db245f1bd2cda5abd27c42a62520f23f8be55ed36673ae\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/primeintellect/Kk6EAHv3Qhta4r9y/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Prime Intellect Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9946FC\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.primeintellect.ai/sandboxes/checkpoints\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sandboxes/checkpoints.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.primeintellect.ai/#organization\",\"name\":\"Prime Intellect Docs\",\"url\":\"https://docs.primeintellect.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/primeintellect/X3F2tnEstSGMOi8f/logo/logo-dark-font.svg?fit=max\u0026auto=format\u0026n=X3F2tnEstSGMOi8f\u0026q=85\u0026s=4530d2da1baa9b91284a28d341a96d41\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.primeintellect.ai#website\",\"name\":\"Prime Intellect Docs\",\"url\":\"https://docs.primeintellect.ai\",\"publisher\":{\"@id\":\"https://docs.primeintellect.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.primeintellect.ai/sandboxes/checkpoints#webpage\",\"url\":\"https://docs.primeintellect.ai/sandboxes/checkpoints\",\"name\":\"Checkpoints \u0026 Forking\",\"description\":\"Save a sandbox's filesystem, restore it, or branch it\",\"dateModified\":\"2026-10-20T17:30:20.980Z\",\"isPartOf\":{\"@id\":\"https://docs.primeintellect.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.primeintellect.ai/sandboxes/checkpoints#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.primeintellect.ai/sandboxes/checkpoints#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Compute\",\"item\":\"https://docs.primeintellect.ai/sandboxes/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sandboxes\",\"item\":\"https://docs.primeintellect.ai/sandboxes/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Checkpoints \u0026 Forking\",\"item\":\"https://docs.primeintellect.ai/sandboxes/checkpoints\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.primeintellect.ai/sandboxes/checkpoints#article\",\"headline\":\"Checkpoints \u0026 Forking\",\"name\":\"Checkpoints \u0026 Forking\",\"description\":\"Save a sandbox's filesystem, restore it, or branch it\",\"url\":\"https://docs.primeintellect.ai/sandboxes/checkpoints\",\"mainEntityOfPage\":{\"@id\":\"https://docs.primeintellect.ai/sandboxes/checkpoints#webpage\"},\"dateModified\":\"2026-10-20T17:30:20.980Z\",\"publisher\":{\"@id\":\"https://docs.primeintellect.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.primeintellect.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Prime Intellect Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Prime Intellect Docs","nav":{"global":{"anchors":[{"anchor":"Join Discord","icon":"discord","href":"https://discord.gg/ZTFydGWPKj"},{"anchor":"Twitter","icon":"twitter","href":"https://twitter.com/PrimeIntellect"},{"anchor":"Blog","icon":"newspaper","href":"https://www.primeintellect.ai/blog"}]},"tabs":[{"tab":"Platform","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Platform Overview","sidebarTitle":"Platform Overview","href":"/platform-overview"}]},{"group":"Inference","pages":[{"title":"Prime Inference","icon":"https://mintlify.s3.us-west-1.amazonaws.com/primeintellect/images/inference.svg","href":"/inference/overview"},{"title":"Troubleshooting","sidebarTitle":"Troubleshooting","icon":"circle-question","href":"/inference/troubleshooting"}]},{"group":"Model Factory","tag":"BETA","pages":[{"group":"Training","pages":[{"title":"Getting Started","sidebarTitle":"Getting Started","href":"/hosted-training/getting-started"},{"title":"The Environment Model","sidebarTitle":"Environment Model","href":"/hosted-training/environment-model"},{"title":"End-to-End Training Run","sidebarTitle":"End-to-End Run","href":"/hosted-training/end-to-end-run"},{"title":"Hosted RL (Beta)","sidebarTitle":"Hosted RL","href":"/hosted-training/hosted-rl"},{"title":"Hosted SFT (Beta)","sidebarTitle":"Hosted SFT","href":"/hosted-training/hosted-sft"},{"title":"Volumes (Beta)","sidebarTitle":"Volumes","href":"/hosted-training/volumes"},{"title":"Volume capacity and checkpoint sizing","sidebarTitle":"Volume capacity","href":"/hosted-training/volume-capacity"},{"title":"Pause and resume runs","sidebarTitle":"Pause and resume","href":"/hosted-training/pause-resume"},{"title":"Models","sidebarTitle":"Models","href":"/hosted-training/models"},{"title":"Billing","sidebarTitle":"Billing","href":"/hosted-training/billing"},{"title":"Troubleshooting","sidebarTitle":"Troubleshooting","href":"/hosted-training/troubleshooting"},{"group":"Advanced","pages":[{"title":"Volume-hosted models","sidebarTitle":"Volume-hosted models","href":"/hosted-training/volume-models"}]}]},{"group":"Evaluations","pages":[{"title":"Evaluating Environments","href":"/tutorials-environments/evaluating"},{"title":"Hosted Evaluations","href":"/tutorials-environments/hosted-evaluations"}]},{"group":"Dedicated Clusters","pages":[{"title":"Model Factory Clusters","sidebarTitle":"Clusters","href":"/model-factory/clusters"},{"title":"Cluster Monitoring","icon":"chart-line","href":"/model-factory/monitoring"},{"title":"Slurm Orchestration","icon":"server","href":"/model-factory/slurm-orchestration"}]},{"title":"Shared LoRA Training (Retired)","sidebarTitle":"Shared LoRA (Retired)","href":"/hosted-training/shared-lora-retired"}]},{"group":"Community","pages":[{"group":"Environments Hub","pages":[{"title":"Overview","href":"/tutorials-environments/environments"},{"title":"Getting Started","href":"/tutorials-environments/getting-started"},{"title":"Create \u0026 Upload Environment","href":"/tutorials-environments/create"},{"title":"Install \u0026 Use Environment","href":"/tutorials-environments/install"},{"title":"Secrets","href":"/tutorials-environments/secrets"},{"title":"Environment Variables","href":"/tutorials-environments/environment-variables"},{"title":"Manage Collaborators","href":"/tutorials-environments/manage-collaborators"}]}]},{"group":"Compute","pages":[{"group":"Sandboxes","pages":[{"title":"Sandboxes Overview","sidebarTitle":"Overview","href":"/sandboxes/overview"},{"title":"Create \u0026 Manage Sandboxes","sidebarTitle":"Create \u0026 Manage","href":"/sandboxes/lifecycle"},{"title":"Run Commands \u0026 SSH","sidebarTitle":"Commands \u0026 SSH","href":"/sandboxes/commands"},{"title":"Files","href":"/sandboxes/files"},{"title":"Environment Variables \u0026 Secrets","sidebarTitle":"Env Vars \u0026 Secrets","href":"/sandboxes/secrets"},{"title":"Network Isolation","href":"/sandboxes/network-isolation"},{"title":"Private Networks","description":"Connect sandboxes to each other over a private, rule-controlled network","href":"/sandboxes/networks"},{"title":"Checkpoints \u0026 Forking","href":"/sandboxes/checkpoints"},{"title":"Pause \u0026 Resume","description":"Stop a sandbox's compute and pick up exactly where it left off","href":"/sandboxes/pause-resume"},{"title":"Volumes","href":"/sandboxes/volumes"},{"title":"Prime Images","href":"/sandboxes/images"},{"title":"Prime Tunnels","href":"/sandboxes/tunnel"},{"title":"Python SDK","href":"/sandboxes/sdk"}]},{"group":"Storage","pages":[{"title":"Create persistent storage","icon":"hard-drive","href":"/tutorials-storage/create-persistent-storage"},{"title":"Use persistent storage with instances","icon":"download","href":"/tutorials-storage/use-persistent-storage-with-instances"}]},{"title":"FAQ","href":"/faq"}]},{"group":"Traces","pages":[{"title":"Traces Overview","sidebarTitle":"Overview","href":"/traces/overview"},{"title":"Uploading traces","href":"/traces/uploading"},{"title":"Pricing and settings","href":"/traces/pricing-and-settings"},{"title":"Viewing and deleting traces","href":"/traces/managing-traces"},{"title":"Legacy storage retirement","href":"/traces/legacy-storage"}]},{"group":"Libraries","pages":[{"group":"verifiers","pages":[{"title":"Overview","href":"/verifiers/overview"},{"title":"Getting Started","href":"/verifiers/getting_started"},{"title":"Architecture","href":"/verifiers/architecture"},{"title":"Building Environments","href":"/verifiers/building-environments"},{"title":"Tasksets","href":"/verifiers/tasksets"},{"title":"Runtimes","href":"/verifiers/runtimes"},{"title":"Debugging","href":"/verifiers/debugging"},{"title":"Harnesses","href":"/verifiers/harnesses"},{"title":"Agent","href":"/verifiers/agent"},{"title":"Env","href":"/verifiers/env"},{"title":"Harbor","href":"/verifiers/harbor"},{"title":"Gepa","href":"/verifiers/gepa"}]},{"group":"prime-rl","pages":[{"title":"Overview","href":"/prime-rl/overview"},{"title":"Configuration","href":"/prime-rl/configuration"},{"title":"Training","href":"/prime-rl/training"},{"title":"Eval","href":"/prime-rl/eval"},{"title":"Inference","href":"/prime-rl/inference"},{"title":"Scaling","href":"/prime-rl/scaling"},{"title":"Model Express","href":"/prime-rl/model-express"},{"title":"Algorithms","href":"/prime-rl/algorithms"},{"title":"Ipo","href":"/prime-rl/ipo"},{"title":"Advanced","href":"/prime-rl/advanced"},{"title":"Development","href":"/prime-rl/development"}]}]}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"API","pages":[{"title":"API","href":"/api-reference/introduction"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli-reference/introduction"}]}]},"basePath":"","title":"Checkpoints \u0026 Forking - Prime Intellect Docs","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":[],"chunks":[]}