{"record":{"id":"2eaace2ff22b4c8c","repo":"Yeachan-Heo/oh-my-codex","slug":"omx-cancel-all-is-not-supported-broad-workspace","errorCode":null,"errorMessage":"omx cancel --all is not supported; broad workspace cancellation requires a separate command.","messagePattern":"omx cancel --all is not supported; broad workspace cancellation requires a separate command\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/index.ts","lineNumber":8369,"sourceCode":"    assertExactSkillOwner(entry, authority, entryPath);\n  }\n}\n\ninterface CancellationTestFaults {\n  writeFailureMode?: string;\n  rollbackFailureMode?: string;\n}\n\nasync function cancelModes(\n  args: string[] = [],\n  options: { cwd?: string; testFaults?: CancellationTestFaults } = {},\n): Promise<void> {\n\n  const cwd = options.cwd ?? process.cwd();\n  const nowIso = new Date().toISOString();\n  if (args.length > 1 || args.some((arg) => arg !== \"--force\")) {\n    const unsupported = args.find((arg) => arg !== \"--force\") ?? args[1] ?? \"\";\n    throw new Error(unsupported === \"--all\"\n      ? \"omx cancel --all is not supported; broad workspace cancellation requires a separate command.\"\n      : `Unknown cancel argument: ${unsupported}`);\n  }\n  const force = args.length === 1;\n  try {\n    const writableScope = await resolveWritableStateScope(cwd);\n    const baseStateDir = getBaseStateDir(cwd);\n    const exactAuthority = writableScope.source === \"session\"\n      ? await resolveExactSessionCancellationAuthority(cwd, baseStateDir, writableScope.sessionId)\n      : undefined;\n    const expectedOwnerIds = collectCancellationOwnerIds(baseStateDir, writableScope.sessionId);\n\n\n    const loadStates = async (\n      refs: ModeStateFileRef[],\n      authorityRoot: string,\n      ownerIds: Set<string> = expectedOwnerIds,\n    ) => {","sourceCodeStart":8351,"sourceCodeEnd":8387,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/index.ts#L8351-L8387","documentation":"The cancel command explicitly rejects --all as an argument. Broad, workspace-wide cancellation is considered a distinct, more dangerous operation and is deliberately not folded into omx cancel, so the CLI stops with this explanatory error instead of performing it. This is a designed guardrail, not a bug.","triggerScenarios":"Running the CLI cancel handler with args containing --all (e.g. omx cancel --all or programmatic invocation passing [\"--all\"]). Any argument other than the single supported --force flag trips the shared check; --all gets this specific message.","commonSituations":"Users assuming cancel mirrors kill/stop semantics with --all; shell aliases or scripts that pass --all by default; copy-pasted commands from docs of other tools.","solutions":["Cancel specific targets individually instead of using --all","Check --help for a dedicated broad-cancellation command if one exists in your version","Update your scripts to drop --all","File a feature request if workspace-wide cancellation is needed and unavailable"],"exampleFix":"# before\nomx cancel --all\n# after\nomx cancel <target>\nomx cancel <target2>","handlingStrategy":"try-catch","validationCode":"const args = [\"--all\"];\nif (args.includes(\"--all\")) {\n  throw new Error(\"--all is unsupported; cancel targets individually\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  await cancel(args, options);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"--all is not supported\")) {\n    // fall back to per-target cancellation\n  } else throw err;\n}","preventionTips":["Read omx cancel --help before scripting","Don't assume POSIX-style --all semantics","Pin CLI version in scripts to avoid behavior drift"],"tags":["cli","unsupported-flag","cancel","argument-validation"],"backgroundTag":"unsupported-command-flag","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}