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

Usage: omx team shutdown <team-name> [--force] [--confirm-is

Error message

Usage: omx team shutdown <team-name> [--force] [--confirm-issues]

What it means

Thrown by the `omx team shutdown` subcommand when the required team-name positional is missing. Shutdown tears down a team's panes/workers and requires the target name plus optional --force/--confirm-issues flags.

Source

Thrown at src/cli/team.ts:1700

      explicitAgentType: false,
      explicitWorkerCount: false,
      teamName: runtime.teamName,
      displayName: runtime.config.display_name ?? runtime.teamName,
      allowRepoAwareDagHandoff: false,
    });
    const availableAgentTypes = await resolveAvailableAgentTypes(cwd);
    const staffingPlan = buildFollowupStaffingPlan('team', runtime.config.task, availableAgentTypes, {
      workerCount: runtime.config.worker_count,
      fallbackRole: resolveImplicitTeamFallbackRole(runtime.config.agent_type, false),
      codexHomeOverride,
    });
    await renderStartSummary(runtime, staffingPlan);
    return;
  }

  if (subcommand === 'shutdown') {
    const name = teamArgs[1];
    if (!name) throw new Error('Usage: omx team shutdown <team-name> [--force] [--confirm-issues]');
    const force = teamArgs.includes('--force');
    const confirmIssues = teamArgs.includes('--confirm-issues');
    const resolvedName = resolveTeamNameForCurrentContext(name, cwd);
    const configBeforeShutdown = await readTeamConfig(resolvedName, cwd);
    const summary = await shutdownTeam(resolvedName, cwd, { force, confirmIssues });
    await persistTeamShutdownModeState(
      resolvedName,
      cwd,
      configBeforeShutdown
        ? {
          task: configBeforeShutdown.task,
          workerCount: configBeforeShutdown.worker_count,
          agentType: configBeforeShutdown.agent_type,
        }
        : null,
    ).catch((error: unknown) => {
      console.warn('[omx] warning: failed to persist team mode shutdown state', {
        team: name,

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Run omx team shutdown <team-name> --force if needed
  2. Confirm the team name via omx team status first
  3. Validate the name argument exists in cleanup scripts before invoking omx

Example fix

# before
omx team shutdown --force
# after
omx team shutdown my-team --force
Defensive patterns

Strategy: validation

Validate before calling

const [cmd, name] = args;
if (cmd === 'shutdown' && !name) { console.error('team name required'); process.exit(1); }

Prevention

When it happens

Trigger: Running `omx team shutdown` or `omx team shutdown --force` with no name; flag-first invocations where no positional follows.

Common situations: Users trying to shut down 'the current team' without naming it; CI cleanup scripts where the team-name variable is empty.

Related errors


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