{"record":{"id":"4aac8d043f94e277","repo":"Yeachan-Heo/oh-my-codex","slug":"usage-omx-team-await-team-name-timeout-ms-m","errorCode":null,"errorMessage":"Usage: omx team await <team-name> [--timeout-ms <ms>] [--after-event-id <id>] [--json]","messagePattern":"Usage: omx team await <team-name> \\[--timeout-ms <ms>\\] \\[--after-event-id <id>\\] \\[--json\\]","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/team.ts","lineNumber":1590,"sourceCode":"    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}`);\n    if (snapshot.performance) {\n      console.log(\n        `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}`\n      );\n    }\n    if (ultragoalContextWarning) {\n      console.log(`ultragoal_context_warning: ${ultragoalContextWarning.message}`);\n    }\n    for (const line of renderUltragoalCheckpointGuidanceText(currentUltragoalContext)) {\n      console.log(line);\n    }\n    renderTeamPaneStatus(paneStatus, modelInspect, tailLines);\n    return;\n  }\n\n  if (subcommand === 'await') {\n    const name = teamArgs[1];\n    if (!name) throw new Error('Usage: omx team await <team-name> [--timeout-ms <ms>] [--after-event-id <id>] [--json]');\n    const wantsJson = teamArgs.includes('--json');\n    const timeoutIdx = teamArgs.indexOf('--timeout-ms');\n    const afterIdx = teamArgs.indexOf('--after-event-id');\n    const timeoutMs = timeoutIdx >= 0 && teamArgs[timeoutIdx + 1]\n      ? Math.max(1, Number.parseInt(teamArgs[timeoutIdx + 1]!, 10) || 0)\n      : 30_000;\n    const afterEventId = afterIdx >= 0 ? (teamArgs[afterIdx + 1] || '') : '';\n    const resolvedName = resolveTeamNameForCurrentContext(name, cwd);\n    const config = await readTeamConfig(resolvedName, cwd);\n    if (!config) {\n      if (wantsJson) {\n        console.log(JSON.stringify({ team_name: name, status: 'missing', cursor: afterEventId || '', event: null }));\n      } else {\n        console.log(`No team state found for ${name}`);\n      }\n      return;\n    }\n","sourceCodeStart":1572,"sourceCodeEnd":1608,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/team.ts#L1572-L1608","documentation":"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.","triggerScenarios":"Running `omx team await` alone, or `omx team await --timeout-ms 60000` where the flag occupies the first positional slot and no name follows.","commonSituations":"Copying the flags from help but forgetting the name; scripts parameterizing timeout while the team name variable is empty.","solutions":["Provide the team name first: omx team await my-team --timeout-ms 60000","Verify the team exists via omx team status before awaiting","In scripts, guard that the name variable is non-empty"],"exampleFix":"# before\nomx team await --timeout-ms 60000\n# after\nomx team await my-team --timeout-ms 60000 --json","handlingStrategy":"validation","validationCode":"const [cmd, name] = args;\nif (cmd === 'await' && !name) { console.error('team name required'); process.exit(1); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Put the team name before any flags","Verify the team exists with status before awaiting"],"tags":["cli","usage","argument-validation","team","await"],"backgroundTag":"cli-usage-error","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}