{"record":{"id":"6d6dd4c6f935c9f1","repo":"Yeachan-Heo/oh-my-codex","slug":"usage-omx-team-status-team-name-json","errorCode":null,"errorMessage":"Usage: omx team status <team-name> [--json]","messagePattern":"Usage: omx team status <team-name> \\[--json\\]","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/team.ts","lineNumber":1479,"sourceCode":"        ...envelope,\n      }));\n      if (!envelope.ok) process.exitCode = 1;\n      return;\n    }\n    if (envelope.ok) {\n      console.log(`ok operation=${envelope.operation}`);\n      console.log(JSON.stringify(envelope.data, null, 2));\n      return;\n    }\n    console.error(`error operation=${envelope.operation} code=${envelope.error.code}: ${envelope.error.message}`);\n    process.exitCode = 1;\n    return;\n  }\n\n  if (subcommand === 'status') {\n    const name = teamArgs[1];\n    const wantsJson = teamArgs.includes('--json');\n    if (!name) throw new Error('Usage: omx team status <team-name> [--json]');\n    const resolvedName = resolveTeamNameForCurrentContext(name, cwd);\n    await recordLeaderRuntimeActivity(cwd, 'team_status', resolvedName);\n    const snapshot = await monitorTeam(resolvedName, cwd);\n    if (!snapshot) {\n      if (wantsJson) {\n        console.log(JSON.stringify({\n          ...buildJsonBase(),\n          command: 'omx team status',\n          team_name: name,\n          status: 'missing',\n        }));\n        return;\n      }\n      console.log(`No team state found for ${name}`);\n      return;\n    }\n    const tailLines = parseStatusTailLines(teamArgs.slice(2));\n    const modelInspect = parseStatusModelInspect(teamArgs.slice(2));","sourceCodeStart":1461,"sourceCodeEnd":1497,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/team.ts#L1461-L1497","documentation":"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.","triggerScenarios":"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.","commonSituations":"Users assuming status applies to the current/active team by default (it does not), or flag-only invocations from scripts.","solutions":["Pass the team name: omx team status my-team --json","Find valid team names with the team listing command or by inspecting .omx state","Script callers should validate the name argument exists before invoking"],"exampleFix":"# before\nomx team status --json\n# after\nomx team status my-team --json","handlingStrategy":"validation","validationCode":"const [cmd, name] = args;\nif (cmd === 'status' && !name) { console.error('team name required'); process.exit(1); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass the team name positional","Look up team names via the listing command before scripting"],"tags":["cli","usage","argument-validation","team","status"],"backgroundTag":"cli-usage-error","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}