{"record":{"id":"11001127bde01b90","repo":"coleam00/Archon","slug":"workflow-parent-resume-no-working-path","errorCode":"workflow.parent_resume_no_working_path","errorMessage":"the parent has no recorded working path","messagePattern":"the parent has no recorded working path","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/workflows/src/executor.ts","lineNumber":1650,"sourceCode":"  if (!isRunBlockedOnChild(parent, childRun.id)) {\n    // Paused but not blocked on this child. Distinguish a MALFORMED child_workflow\n    // gate (missing childRunId — an invariant violation that would wedge the parent\n    // forever; make it loud) from a normal different-child / non-child gate (silent).\n    const approval = isApprovalContext(parent.metadata?.approval)\n      ? parent.metadata.approval\n      : undefined;\n    if (approval?.type === 'child_workflow' && !approval.childRunId) {\n      getLog().error(\n        { parentRunId, childRunId: childRun.id },\n        'workflow.parent_resume_malformed_gate_missing_child_run_id'\n      );\n    }\n    return;\n  }\n\n  const parentCwd = parent.working_path;\n  if (!parentCwd) {\n    getLog().warn(\n      { parentRunId, childRunId: childRun.id },\n      'workflow.parent_resume_no_working_path'\n    );\n    await notifyStuck('the parent has no recorded working path');\n    return;\n  }\n\n  let parentWorkflow: WorkflowDefinition | undefined;\n  try {\n    // Reload the parent's graph from the source IT started with. Rediscovering from\n    // `parentCwd` is how a mid-run authoring edit used to change an already-running\n    // parent's DAG, so stored node output could be reinterpreted by a different node.\n    //\n    // Through the shared entry point like every other continuation surface. This spot\n    // hand-rolled the same sequence and read the capture twice for it, which is how the\n    // fifth surface quietly ends up behaving differently from the other four. Throws when\n    // the recorded capture no longer verifies; the catch below leaves the parent resumable\n    // rather than silently running other source.","sourceCodeStart":1632,"sourceCodeEnd":1668,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/workflows/src/executor.ts#L1632-L1668","documentation":"When a child workflow run is stuck and the engine tries to resume or unwind it through its parent, the parent run record has no `working_path` recorded, so the parent's working directory cannot be re-established. The engine notifies the operator that the run is stuck and stops rather than guessing a directory.","triggerScenarios":"Child run reaches a stuck/recovery path; executor fetches the parent run and `parent.working_path` is null/empty (e.g. run row predates the field, or the parent was created by an older binary or corrupted record).","commonSituations":"Upgrading an old database whose run rows lack working_path; manually edited or imported run records; parent run created before workspace assignment completed.","solutions":["Cancel/restart the parent run so a fresh record with a working_path is written","Backfill `working_path` on the parent run row from the Archon workspace (scratch DB first per project rules)","Verify the parent run record was created by a current binary, not imported"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before resuming a child, confirm the parent record is complete\nconst parent = await runs.get(parentRunId);\nif (!parent?.working_path) throw new Error(`parent run ${parentRunId} has no working_path; restart it`);","typeGuard":"function hasWorkingPath(parent: { working_path?: string | null }): parent is { working_path: string } {\n  return typeof parent.working_path === 'string' && parent.working_path.length > 0;\n}","tryCatchPattern":"try {\n  await resumeChild(childRunId);\n} catch (err) {\n  if (err.message.includes('no recorded working path')) {\n    console.warn('parent run lacks working_path; cancel and restart the parent run');\n  } else throw err;\n}","preventionTips":["Avoid importing or hand-editing run rows; create runs through the engine","Upgrade through supported paths so run rows always carry working_path","Restart stale parents instead of resuming children of incomplete records"],"tags":["resume","workflow","state"],"backgroundTag":"missing-parent-working-path","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}