{"record":{"id":"1c6b80fedce11cfb","repo":"Yeachan-Heo/oh-my-codex","slug":"invalid-omx-team-worker-launch-mode-value-raw","errorCode":null,"errorMessage":"Invalid OMX_TEAM_WORKER_LAUNCH_MODE value \"${raw}\". Expected: interactive, prompt","messagePattern":"Invalid OMX_TEAM_WORKER_LAUNCH_MODE value \"(.+?)\"\\. Expected: interactive, prompt","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/team/state.ts","lineNumber":623,"sourceCode":"  if (['1', 'true', 'yes', 'on', 'enabled', 'allow', 'allowed'].includes(normalized)) return true;\n  if (['0', 'false', 'no', 'off', 'disabled', 'deny', 'denied'].includes(normalized)) return false;\n  return null;\n}\n\nfunction resolveDisplayModeFromEnv(env: NodeJS.ProcessEnv): TeamPolicy['display_mode'] {\n  const raw = readEnvValue(env, ['OMX_TEAM_DISPLAY_MODE', 'OMX_TEAM_MODE']);\n  if (!raw) return 'auto';\n  if (raw === 'in_process' || raw === 'in-process') return 'split_pane';\n  if (raw === 'split_pane' || raw === 'tmux') return 'split_pane';\n  if (raw === 'auto') return 'auto';\n  return 'auto';\n}\n\nfunction resolveWorkerLaunchModeFromEnv(env: NodeJS.ProcessEnv): TeamPolicy['worker_launch_mode'] {\n  const raw = readEnvValue(env, ['OMX_TEAM_WORKER_LAUNCH_MODE']);\n  if (!raw || raw === 'interactive') return 'interactive';\n  if (raw === 'prompt') return 'prompt';\n  throw new Error(`Invalid OMX_TEAM_WORKER_LAUNCH_MODE value \"${raw}\". Expected: interactive, prompt`);\n}\n\nfunction resolvePermissionsSnapshot(env: NodeJS.ProcessEnv): PermissionsSnapshot {\n  const snapshot = defaultPermissionsSnapshot();\n\n  const approvalMode = readEnvValue(env, [\n    'OMX_APPROVAL_MODE',\n    'CODEX_APPROVAL_MODE',\n    'CODEX_APPROVAL_POLICY',\n    'CLAUDE_CODE_APPROVAL_MODE',\n  ]);\n  if (approvalMode) snapshot.approval_mode = approvalMode;\n\n  const sandboxMode = readEnvValue(env, ['OMX_SANDBOX_MODE', 'CODEX_SANDBOX_MODE', 'SANDBOX_MODE']);\n  if (sandboxMode) snapshot.sandbox_mode = sandboxMode;\n\n  const network = parseOptionalBoolean(readEnvValue(env, ['OMX_NETWORK_ACCESS', 'CODEX_NETWORK_ACCESS', 'NETWORK_ACCESS']));\n  if (network !== null) snapshot.network_access = network;","sourceCodeStart":605,"sourceCodeEnd":641,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/team/state.ts#L605-L641","documentation":"The OMX_TEAM_WORKER_LAUNCH_MODE environment variable was set to a value other than 'interactive' or 'prompt' (empty/unset defaults to interactive). Thrown by resolveWorkerLaunchModeFromEnv when resolving team policy.","triggerScenarios":"Setting OMX_TEAM_WORKER_LAUNCH_MODE to e.g. 'headless', 'auto', 'Interactive' (case-sensitive), or any other string, then loading team policy/worker launch mode.","commonSituations":"Copy-pasted config from other tools with different mode names; typo or trailing whitespace in .env files; case mismatch; CI setting an unsupported mode after an upgrade changed allowed values.","solutions":["Set the variable to exactly 'interactive' or 'prompt', or unset it entirely","Check for typos, whitespace, and casing in .env / CI environment definitions","Document allowed values wherever the variable is configured (deployment manifests)"],"exampleFix":"# before\nexport OMX_TEAM_WORKER_LAUNCH_MODE=headless\n\n# after\nexport OMX_TEAM_WORKER_LAUNCH_MODE=prompt  # or unset for interactive","handlingStrategy":"validation","validationCode":"const VALID_MODES = new Set(['interactive', 'prompt']);\nfunction launchModeValid(raw: string | undefined): boolean {\n  return raw === undefined || raw === '' || VALID_MODES.has(raw);\n}","typeGuard":"function isValidLaunchMode(v: string): v is 'interactive' | 'prompt' {\n  return v === 'interactive' || v === 'prompt';\n}","tryCatchPattern":"catch (e) {\n  const m = /Invalid OMX_TEAM_WORKER_LAUNCH_MODE value \"(.*)\"/.exec(String((e as Error).message));\n  if (m) { delete process.env.OMX_TEAM_WORKER_LAUNCH_MODE; /* default interactive */ return retry(); }\n  throw e;\n}","preventionTips":["Document allowed values ('interactive', 'prompt') where the env var is set","Trim whitespace and use exact lowercase values in .env and CI variables"],"tags":["team","env-var","configuration","validation"],"backgroundTag":"invalid-env-var-value","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}