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

Usage: omx team status <team-name> [--json]

Error message

Usage: omx team status <team-name> [--json]

What it means

Thrown by the `omx team status` subcommand when no team-name positional argument is present. Status requires exactly one team name (plus optional --json). Missing it aborts before any monitoring or state lookup happens.

Source

Thrown at src/cli/team.ts:1479

        ...envelope,
      }));
      if (!envelope.ok) process.exitCode = 1;
      return;
    }
    if (envelope.ok) {
      console.log(`ok operation=${envelope.operation}`);
      console.log(JSON.stringify(envelope.data, null, 2));
      return;
    }
    console.error(`error operation=${envelope.operation} code=${envelope.error.code}: ${envelope.error.message}`);
    process.exitCode = 1;
    return;
  }

  if (subcommand === 'status') {
    const name = teamArgs[1];
    const wantsJson = teamArgs.includes('--json');
    if (!name) throw new Error('Usage: omx team status <team-name> [--json]');
    const resolvedName = resolveTeamNameForCurrentContext(name, cwd);
    await recordLeaderRuntimeActivity(cwd, 'team_status', resolvedName);
    const snapshot = await monitorTeam(resolvedName, cwd);
    if (!snapshot) {
      if (wantsJson) {
        console.log(JSON.stringify({
          ...buildJsonBase(),
          command: 'omx team status',
          team_name: name,
          status: 'missing',
        }));
        return;
      }
      console.log(`No team state found for ${name}`);
      return;
    }
    const tailLines = parseStatusTailLines(teamArgs.slice(2));
    const modelInspect = parseStatusModelInspect(teamArgs.slice(2));

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Pass the team name: omx team status my-team --json
  2. Find valid team names with the team listing command or by inspecting .omx state
  3. Script callers should validate the name argument exists before invoking

Example fix

# before
omx team status --json
# after
omx team status my-team --json
Defensive patterns

Strategy: validation

Validate before calling

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

Prevention

When it happens

Trigger: Running `omx team status` with no arguments; running `omx team status --json` where the flag is tokenized as teamArgs[1] and no name is given.

Common situations: Users assuming status applies to the current/active team by default (it does not), or flag-only invocations from scripts.

Related errors


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