{"record":{"id":"90623beb03eaae2d","repo":"coleam00/Archon","slug":"refusing-to-delete-every-persisted-session-for-wor","errorCode":null,"errorMessage":"Refusing to delete every persisted session for workflow '${workflowName}' across all scopes without confirmation.\nPass --scope <key> to narrow, or --yes to confirm cross-scope reset.","messagePattern":"Refusing to delete every persisted session for workflow '(.+?)' across all scopes without confirmation\\.\nPass --scope <key> to narrow, or --yes to confirm cross-scope reset\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":4889,"sourceCode":"  }\n}\n\n/**\n * Reset persisted per-node provider sessions for a workflow.\n *\n * Filter rules:\n *   - workflow-name required (positional)\n *   - --scope <key>: restrict to one scope (e.g. a conversation UUID); when\n *     omitted, deletes across ALL scopes (use --yes to skip the confirmation)\n *   - --node <id>: restrict to one node within the scope\n *   - --json: machine-readable output\n */\nexport async function workflowResetSessionsCommand(\n  workflowName: string,\n  options: { scope?: string; node?: string; yes?: boolean; json?: boolean }\n): Promise<void> {\n  if (!options.scope && !options.yes) {\n    throw new Error(\n      `Refusing to delete every persisted session for workflow '${workflowName}' across all scopes without confirmation.\\n` +\n        'Pass --scope <key> to narrow, or --yes to confirm cross-scope reset.'\n    );\n  }\n  try {\n    const { deleted } = await resetWorkflowNodeSessions({\n      workflow_name: workflowName,\n      scope_key: options.scope,\n      node_id: options.node,\n    });\n    if (options.json) {\n      await writeStdout(\n        `${JSON.stringify({\n          workflow: workflowName,\n          deleted,\n          scope: options.scope ?? null,\n          node: options.node ?? null,\n        })}\\n`","sourceCodeStart":4871,"sourceCodeEnd":4907,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L4871-L4907","documentation":"Error \"Refusing to delete every persisted session for workflow '${workflowName}' across all scopes without confirmation.\nPass --scope <key> to narrow, or --yes to confirm cross-scope reset.\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/cli/src/commands/workflow.ts:4889 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}