Yeachan-Heo/oh-my-codex · error · Error
Usage: omx team [N:agent-type] "<task description>"
Error message
Usage: omx team [N:agent-type] "<task description>"
What it means
Thrown by the `omx team` CLI command when, after parsing optional worker-count and agent-type tokens, the remaining argument tokens are empty so no task description was supplied. The team-spawn flow requires a free-text task as the last argument. It is a usage/argument-validation error printed to the CLI user.
Source
Thrown at src/cli/team.ts:872
const first = tokens[0] || '';
const match = first.match(/^(\d+)(?::([a-z][a-z0-9-]*))?$/i);
if (match) {
const count = Number.parseInt(match[1], 10);
if (!Number.isFinite(count) || count < MIN_WORKER_COUNT || count > DEFAULT_MAX_WORKERS) {
throw new Error(`Invalid worker count "${match[1]}". Expected ${MIN_WORKER_COUNT}-${DEFAULT_MAX_WORKERS}.`);
}
workerCount = count;
explicitWorkerCount = true;
if (match[2]) {
agentType = match[2];
explicitAgentType = true;
}
tokens.shift();
}
const task = tokens.join(' ').trim();
if (!task) {
throw new Error('Usage: omx team [N:agent-type] "<task description>"');
}
const followupContext = resolveApprovedTeamFollowupContext(cwd, task);
const effectiveTask = followupContext?.task ?? task;
if (followupContext) {
if (!explicitWorkerCount) {
workerCount = followupContext.workerCount;
explicitWorkerCount = followupContext.explicitWorkerCount;
}
if (!explicitAgentType && followupContext.agentType) {
agentType = followupContext.agentType;
explicitAgentType = followupContext.explicitAgentType === true;
}
}
const explicitApprovedCommand = followupContext == null
? buildExplicitOmxTeamLaunchCommand(
effectiveTask,View on GitHub (pinned to 3ad79a8a6f)
Solutions
- Re-run with a quoted task description: omx team 3:coder "refactor the auth module"
- Check `omx team --help` for the exact grammar of the [N:agent-type] prefix
- If calling from a script, assert the task variable is non-empty before invoking omx
Example fix
# before omx team 2:reviewer # after omx team 2:reviewer "review PR #42 for race conditions"
Defensive patterns
Strategy: validation
Validate before calling
const args = process.argv.slice(2);
const hasTask = args.join(' ').trim().length > 0;
if (!hasTask) { console.error('task description required'); process.exit(1); } Prevention
- Always pass the task as a single quoted string
- In scripts, assert task variables are non-empty before invoking omx
- Check omx team help for the [N:agent-type] grammar
When it happens
Trigger: Running `omx team` with no arguments, or with only a count/agent-type pair like `omx team 3 coder` and no trailing task string; also when the task is only whitespace after tokens are joined and trimmed.
Common situations: Users unfamiliar with the team subcommand syntax, shell-quoting mistakes that swallow the quoted task, or scripts that pass an empty string variable as the task.
Related errors
- Usage: omx team status <team-name> [--json]
- Usage: omx team await <team-name> [--timeout-ms <ms>] [--aft
- Usage: omx team resume <team-name>
- Usage: omx team shutdown <team-name> [--force] [--confirm-is
- unknown list option: ${unknown[0]}
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/34c3aa40cf694f0d.
Report an issue: GitHub.