{"record":{"id":"34c3aa40cf694f0d","repo":"Yeachan-Heo/oh-my-codex","slug":"usage-omx-team-n-agent-type-task-description","errorCode":null,"errorMessage":"Usage: omx team [N:agent-type] \"<task description>\"","messagePattern":"Usage: omx team \\[N:agent-type\\] \"<task description>\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/team.ts","lineNumber":872,"sourceCode":"  const first = tokens[0] || '';\n  const match = first.match(/^(\\d+)(?::([a-z][a-z0-9-]*))?$/i);\n  if (match) {\n    const count = Number.parseInt(match[1], 10);\n    if (!Number.isFinite(count) || count < MIN_WORKER_COUNT || count > DEFAULT_MAX_WORKERS) {\n      throw new Error(`Invalid worker count \"${match[1]}\". Expected ${MIN_WORKER_COUNT}-${DEFAULT_MAX_WORKERS}.`);\n    }\n    workerCount = count;\n    explicitWorkerCount = true;\n    if (match[2]) {\n      agentType = match[2];\n      explicitAgentType = true;\n    }\n    tokens.shift();\n  }\n\n  const task = tokens.join(' ').trim();\n  if (!task) {\n    throw new Error('Usage: omx team [N:agent-type] \"<task description>\"');\n  }\n\n  const followupContext = resolveApprovedTeamFollowupContext(cwd, task);\n  const effectiveTask = followupContext?.task ?? task;\n  if (followupContext) {\n    if (!explicitWorkerCount) {\n      workerCount = followupContext.workerCount;\n      explicitWorkerCount = followupContext.explicitWorkerCount;\n    }\n    if (!explicitAgentType && followupContext.agentType) {\n      agentType = followupContext.agentType;\n      explicitAgentType = followupContext.explicitAgentType === true;\n    }\n  }\n\n  const explicitApprovedCommand = followupContext == null\n    ? buildExplicitOmxTeamLaunchCommand(\n      effectiveTask,","sourceCodeStart":854,"sourceCodeEnd":890,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/team.ts#L854-L890","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before\nomx team 2:reviewer\n# after\nomx team 2:reviewer \"review PR #42 for race conditions\"","handlingStrategy":"validation","validationCode":"const args = process.argv.slice(2);\nconst hasTask = args.join(' ').trim().length > 0;\nif (!hasTask) { console.error('task description required'); process.exit(1); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["cli","usage","argument-validation","team"],"backgroundTag":"cli-usage-error","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}