{"record":{"id":"2150b2643e73e5e7","repo":"coleam00/Archon","slug":"open-and-status-are-mutually-exclusive-the-in","errorCode":null,"errorMessage":"--open and --status are mutually exclusive: the inbox is failed runs only.","messagePattern":"--open and --status are mutually exclusive: the inbox is failed runs only\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":3913,"sourceCode":" * way `workflow run` does, then lists that project's recent runs of every\n * status. `--all` drops the project scope (lists across all projects);\n * `--status` filters to one status; `--limit` caps the count (default 20).\n */\nexport async function workflowRunsCommand(\n  cwd: string,\n  opts: { json?: boolean; all?: boolean; status?: string; limit?: number; open?: boolean } = {}\n): Promise<void> {\n  // Open-work inbox (#2747): terminal failed runs nothing has adopted or\n  // superseded — the operator's \"what ended with work on the table\" query.\n  // Status-derived v1 semantics; --status/--open are mutually exclusive shapes.\n  if (opts.open) {\n    if (opts.status) {\n      const msg = '--open and --status are mutually exclusive: the inbox is failed runs only.';\n      if (opts.json) {\n        await writeJsonLine({ ok: false, error: msg });\n        return;\n      }\n      throw new Error(msg);\n    }\n    let codebase = null;\n    if (!opts.all) {\n      try {\n        codebase = await findCodebaseForCheckoutPath(cwd);\n      } catch (error) {\n        getLog().warn({ err: error as Error, cwd }, 'cli.workflow_runs_codebase_lookup_failed');\n      }\n    }\n    const runs = await workflowDb.findOpenWorkRuns({\n      codebaseId: opts.all ? undefined : (codebase?.id ?? undefined),\n      limit: opts.limit ?? 20,\n    });\n    if (opts.json) {\n      await writeJsonLine({ runs, total: runs.length, scopeFallback: !opts.all && !codebase });\n      return;\n    }\n    if (runs.length === 0) {","sourceCodeStart":3895,"sourceCodeEnd":3931,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L3895-L3931","documentation":"`archon workflow inbox --open` rejects `--status` because the inbox view is, by definition, the set of failed runs; filtering by status would contradict that. The CLI throws for humans and emits a {ok:false} JSON line under --json.","triggerScenarios":"Calling `archon workflow inbox --open --status <any status>` (or the equivalent programmatic opts combination status!=='').","commonSituations":"Scripts that pass a uniform --status flag to every workflow subcommand, or users copying status-filter syntax from `workflow runs` to `workflow inbox`.","solutions":["Remove the --status flag when using --open; the inbox already implies status=failed.","Use `archon workflow runs --status failed` instead if you need explicit status filtering with an open workflow.","Update wrapper scripts to only forward --status to subcommands that support it."],"exampleFix":"// before\narchon workflow inbox --open --status failed\n// after\narchon workflow inbox --open","handlingStrategy":"validation","validationCode":"if (args.includes('--open') && args.includes('--status')) throw new Error('drop --status when using --open');","typeGuard":null,"tryCatchPattern":"try { await inbox(args); } catch (e) { if (String(e.message).includes('mutually exclusive')) { args = args.filter(a => a !== '--status'); await inbox(args); } }","preventionTips":["Treat `inbox --open` as already status-filtered to failed runs; never forward --status to it.","Centralize CLI flag construction in one helper so per-subcommand flag sets are explicit.","Wrap CLI invocations with --json to receive machine-readable flag errors."],"tags":["cli","flag-conflict","workflow"],"backgroundTag":"mutually-exclusive-flags","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}