{"record":{"id":"e4a1d902a45a4ca9","repo":"paperclipai/paperclip","slug":"workspace-durable-seed-missing","errorCode":"workspace_durable_seed_missing","errorMessage":"workspace_durable_seed_missing","messagePattern":"workspace_durable_seed_missing","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/sandbox-managed-runtime.ts","lineNumber":1096,"sourceCode":"  // Optional host span runner for the workspace tarball build. When present, the\n  // host builds both workspace tarballs inside one span named `pack`, so the\n  // host pack time is visible under the `stage.sync` step. The default is a\n  // no-op that keeps the current behavior and control flow. A throwing runner\n  // never changes control flow (see `createRuntimeSpanRunner`).\n  runtimeSpan?: RuntimeSpanRunner;\n}): Promise<PreparedSandboxManagedRuntime> {\n  const workspaceRemoteDir = input.workspaceRemoteDir ?? input.spec.remoteCwd;\n  const runtimeRootDir = path.posix.join(workspaceRemoteDir, \".paperclip-runtime\", input.adapterKey);\n  const syncWorkspace = input.syncWorkspace !== false;\n  const workspaceInboundMode = input.workspaceInboundMode ?? \"host_current\";\n  const stageWorkspace =\n    syncWorkspace && workspaceInboundMode !== \"adopt_remote\";\n  const prepareWorkspaceSeed =\n    syncWorkspace &&\n    workspaceInboundMode === \"adopt_remote\" &&\n    input.workspaceDurableSeed !== undefined;\n  if (workspaceInboundMode === \"durable_seed\" && !input.workspaceDurableSeed) {\n    throw new Error(\"workspace_durable_seed_missing\");\n  }\n\n  // Reject any unsafe asset key before an archive path or an asset directory is\n  // built from it. This runs before the git snapshot work so a bad key fails fast.\n  for (const asset of input.assets ?? []) {\n    assertRuntimeAssetKeyIsSafe(asset.key);\n  }\n\n  // Wrap a host-side staging sub-step or one scheduler task in its own span when\n  // the caller injects a runtime span runner. The runner defaults to a no-op, so\n  // a caller with no injected runner keeps the current control flow, and a\n  // throwing runner never changes it (see `createRuntimeSpanRunner`). The two\n  // pre-`pack` operations — the git enumeration and the baseline content-hash\n  // walk — parent under the `stage.sync` step, so they stop showing up as a\n  // hidden gap at the head of the step. Each inbound task (`stage.workspace`,\n  // `stage.asset.<key>`, `stage.project.<id>`) and each outbound restore task\n  // (`restore.workspace`, `restore.asset.<key>`) opens its own span, so two\n  // concurrent tasks produce overlapping spans and the `pack` span nests under","sourceCodeStart":1078,"sourceCodeEnd":1114,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/adapter-utils/src/sandbox-managed-runtime.ts#L1078-L1114","documentation":"Guard in prepareSandboxManagedRuntime: the spec references a durable workspace seed archive, but the expected seed file is not present at runtime root before the workspace tarballs are built/extracted. The durable seed that should seed the workspace is missing entirely (as opposed to corrupted, which raises workspace_durable_seed_digest_mismatch).","triggerScenarios":"Thrown at packages/adapter-utils/src/sandbox-managed-runtime.ts:1096 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Regenerate the durable seed archive for the workspace and re-run the prepare","Fix the seed path in the runtime spec if it points at the wrong location","Fall back to a full workspace sync (non-seeded) if the seed is optional for the run"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}