Yeachan-Heo/oh-my-codex · error · Error

Missing setup Team mode value after --team-mode. Expected on

Error message

Missing setup Team mode value after --team-mode. Expected one of: enabled, disabled

What it means

--team-mode requires a value (`enabled` or `disabled`) as the next token. Thrown when the flag is last or the next token starts with `-`.

Source

Thrown at src/cli/index.ts:729

      );
    }
    return next as SetupTeamMode;
  };

  for (let index = 0; index < args.length; index += 1) {
    const arg = args[index];
    if (arg === "--disable-team" || arg === "--no-team") {
      setValue("disabled", arg);
      continue;
    }
    if (arg === "--enable-team" || arg === "--team") {
      setValue("enabled", arg);
      continue;
    }
    if (arg === "--team-mode") {
      const next = args[index + 1];
      if (!next || next.startsWith("-")) {
        throw new Error(
          `Missing setup Team mode value after --team-mode. Expected one of: enabled, disabled`,
        );
      }
      setValue(parseValue(next), arg);
      index += 1;
      continue;
    }
    if (arg.startsWith("--team-mode=")) {
      setValue(parseValue(arg.slice("--team-mode=".length)), "--team-mode");
    }
  }

  return value;
}

function splitOmxArgsAtEndOfOptions(args: string[]): {
  omxArgs: string[];
  suffix: string[];

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Append the value or use `--team-mode=enabled`
  2. Use --team/--no-team shorthand

Example fix

# before
omx setup --team-mode
# after
omx setup --team-mode=enabled
Defensive patterns

Strategy: validation

Validate before calling

const i = args.indexOf('--team-mode');
const v = args[i + 1];
if (!v || v.startsWith('-')) throw new Error('missing Team mode value');

Prevention

When it happens

Trigger: `omx setup --team-mode` end-of-args, or `--team-mode --scope project`.

Common situations: Truncated or programmatically built command lines.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/14ddf6c3521b2b55. Report an issue: GitHub.