Yeachan-Heo/oh-my-codex · error · Error

omx cancel --all is not supported; broad workspace cancellat

Error message

omx cancel --all is not supported; broad workspace cancellation requires a separate command.

What it means

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.

Source

Thrown at src/cli/index.ts:8369

    assertExactSkillOwner(entry, authority, entryPath);
  }
}

interface CancellationTestFaults {
  writeFailureMode?: string;
  rollbackFailureMode?: string;
}

async function cancelModes(
  args: string[] = [],
  options: { cwd?: string; testFaults?: CancellationTestFaults } = {},
): Promise<void> {

  const cwd = options.cwd ?? process.cwd();
  const nowIso = new Date().toISOString();
  if (args.length > 1 || args.some((arg) => arg !== "--force")) {
    const unsupported = args.find((arg) => arg !== "--force") ?? args[1] ?? "";
    throw new Error(unsupported === "--all"
      ? "omx cancel --all is not supported; broad workspace cancellation requires a separate command."
      : `Unknown cancel argument: ${unsupported}`);
  }
  const force = args.length === 1;
  try {
    const writableScope = await resolveWritableStateScope(cwd);
    const baseStateDir = getBaseStateDir(cwd);
    const exactAuthority = writableScope.source === "session"
      ? await resolveExactSessionCancellationAuthority(cwd, baseStateDir, writableScope.sessionId)
      : undefined;
    const expectedOwnerIds = collectCancellationOwnerIds(baseStateDir, writableScope.sessionId);


    const loadStates = async (
      refs: ModeStateFileRef[],
      authorityRoot: string,
      ownerIds: Set<string> = expectedOwnerIds,
    ) => {

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Cancel specific targets individually instead of using --all
  2. Check --help for a dedicated broad-cancellation command if one exists in your version
  3. Update your scripts to drop --all
  4. File a feature request if workspace-wide cancellation is needed and unavailable

Example fix

# before
omx cancel --all
# after
omx cancel <target>
omx cancel <target2>
Defensive patterns

Strategy: try-catch

Validate before calling

const args = ["--all"];
if (args.includes("--all")) {
  throw new Error("--all is unsupported; cancel targets individually");
}

Try / catch

try {
  await cancel(args, options);
} catch (err) {
  if (err instanceof Error && err.message.includes("--all is not supported")) {
    // fall back to per-target cancellation
  } else throw err;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/2eaace2ff22b4c8c. Report an issue: GitHub.