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

Usage: omx team await <team-name> [--timeout-ms <ms>] [--aft

Error message

Usage: omx team await <team-name> [--timeout-ms <ms>] [--after-event-id <id>] [--json]

What it means

Thrown by the `omx team await` subcommand when the required team-name positional is absent. Await blocks until a team reaches a terminal state or an event id, and must know which team to wait on.

Source

Thrown at src/cli/team.ts:1590

    console.log(`tasks: total=${snapshot.tasks.total} pending=${snapshot.tasks.pending} blocked=${snapshot.tasks.blocked} in_progress=${snapshot.tasks.in_progress} completed=${snapshot.tasks.completed} failed=${snapshot.tasks.failed}`);
    if (snapshot.performance) {
      console.log(
        `monitor_perf_ms: total=${snapshot.performance.total_ms} list=${snapshot.performance.list_tasks_ms} workers=${snapshot.performance.worker_scan_ms} mailbox=${snapshot.performance.mailbox_delivery_ms}`
      );
    }
    if (ultragoalContextWarning) {
      console.log(`ultragoal_context_warning: ${ultragoalContextWarning.message}`);
    }
    for (const line of renderUltragoalCheckpointGuidanceText(currentUltragoalContext)) {
      console.log(line);
    }
    renderTeamPaneStatus(paneStatus, modelInspect, tailLines);
    return;
  }

  if (subcommand === 'await') {
    const name = teamArgs[1];
    if (!name) throw new Error('Usage: omx team await <team-name> [--timeout-ms <ms>] [--after-event-id <id>] [--json]');
    const wantsJson = teamArgs.includes('--json');
    const timeoutIdx = teamArgs.indexOf('--timeout-ms');
    const afterIdx = teamArgs.indexOf('--after-event-id');
    const timeoutMs = timeoutIdx >= 0 && teamArgs[timeoutIdx + 1]
      ? Math.max(1, Number.parseInt(teamArgs[timeoutIdx + 1]!, 10) || 0)
      : 30_000;
    const afterEventId = afterIdx >= 0 ? (teamArgs[afterIdx + 1] || '') : '';
    const resolvedName = resolveTeamNameForCurrentContext(name, cwd);
    const config = await readTeamConfig(resolvedName, cwd);
    if (!config) {
      if (wantsJson) {
        console.log(JSON.stringify({ team_name: name, status: 'missing', cursor: afterEventId || '', event: null }));
      } else {
        console.log(`No team state found for ${name}`);
      }
      return;
    }

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Provide the team name first: omx team await my-team --timeout-ms 60000
  2. Verify the team exists via omx team status before awaiting
  3. In scripts, guard that the name variable is non-empty

Example fix

# before
omx team await --timeout-ms 60000
# after
omx team await my-team --timeout-ms 60000 --json
Defensive patterns

Strategy: validation

Validate before calling

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

Prevention

When it happens

Trigger: Running `omx team await` alone, or `omx team await --timeout-ms 60000` where the flag occupies the first positional slot and no name follows.

Common situations: Copying the flags from help but forgetting the name; scripts parameterizing timeout while the team name variable is empty.

Understand the failure class

Related errors


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