{"record":{"id":"7cc1cb1de01386ae","repo":"Yeachan-Heo/oh-my-codex","slug":"usage-omx-team-shutdown-team-name-force","errorCode":null,"errorMessage":"Usage: omx team shutdown <team-name> [--force] [--confirm-issues]","messagePattern":"Usage: omx team shutdown <team-name> \\[--force\\] \\[--confirm-issues\\]","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/team.ts","lineNumber":1700,"sourceCode":"      explicitAgentType: false,\n      explicitWorkerCount: false,\n      teamName: runtime.teamName,\n      displayName: runtime.config.display_name ?? runtime.teamName,\n      allowRepoAwareDagHandoff: false,\n    });\n    const availableAgentTypes = await resolveAvailableAgentTypes(cwd);\n    const staffingPlan = buildFollowupStaffingPlan('team', runtime.config.task, availableAgentTypes, {\n      workerCount: runtime.config.worker_count,\n      fallbackRole: resolveImplicitTeamFallbackRole(runtime.config.agent_type, false),\n      codexHomeOverride,\n    });\n    await renderStartSummary(runtime, staffingPlan);\n    return;\n  }\n\n  if (subcommand === 'shutdown') {\n    const name = teamArgs[1];\n    if (!name) throw new Error('Usage: omx team shutdown <team-name> [--force] [--confirm-issues]');\n    const force = teamArgs.includes('--force');\n    const confirmIssues = teamArgs.includes('--confirm-issues');\n    const resolvedName = resolveTeamNameForCurrentContext(name, cwd);\n    const configBeforeShutdown = await readTeamConfig(resolvedName, cwd);\n    const summary = await shutdownTeam(resolvedName, cwd, { force, confirmIssues });\n    await persistTeamShutdownModeState(\n      resolvedName,\n      cwd,\n      configBeforeShutdown\n        ? {\n          task: configBeforeShutdown.task,\n          workerCount: configBeforeShutdown.worker_count,\n          agentType: configBeforeShutdown.agent_type,\n        }\n        : null,\n    ).catch((error: unknown) => {\n      console.warn('[omx] warning: failed to persist team mode shutdown state', {\n        team: name,","sourceCodeStart":1682,"sourceCodeEnd":1718,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/team.ts#L1682-L1718","documentation":"Thrown by the `omx team shutdown` subcommand when the required team-name positional is missing. Shutdown tears down a team's panes/workers and requires the target name plus optional --force/--confirm-issues flags.","triggerScenarios":"Running `omx team shutdown` or `omx team shutdown --force` with no name; flag-first invocations where no positional follows.","commonSituations":"Users trying to shut down 'the current team' without naming it; CI cleanup scripts where the team-name variable is empty.","solutions":["Run omx team shutdown <team-name> --force if needed","Confirm the team name via omx team status first","Validate the name argument exists in cleanup scripts before invoking omx"],"exampleFix":"# before\nomx team shutdown --force\n# after\nomx team shutdown my-team --force","handlingStrategy":"validation","validationCode":"const [cmd, name] = args;\nif (cmd === 'shutdown' && !name) { console.error('team name required'); process.exit(1); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Name the team explicitly in shutdown commands","In CI cleanup, derive the name from creation output rather than a variable that may be empty"],"tags":["cli","usage","argument-validation","team","shutdown"],"backgroundTag":"cli-usage-error","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}