{"record":{"id":"dc9544b579d07331","repo":"Yeachan-Heo/oh-my-codex","slug":"invalid-source-missing-value-for-configflag","errorCode":null,"errorMessage":"Invalid ${source}: missing value for ${configFlag}","messagePattern":"Invalid (.+?): missing value for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/team/model-contract.ts","lineNumber":435,"sourceCode":"      } else {\n        sandboxValue = setDirectPolicyValue(sandboxValue, value, 'sandbox', source);\n      }\n      continue;\n    }\n\n    const config = configSelector(arg);\n    if (config) {\n      const splitConfig = config.value === undefined;\n      const configValue = splitConfig ? args[i + 1] : config.value;\n      const configValueMissing = typeof configValue !== 'string'\n        || configValue.trim() === ''\n        || configValue.trim().startsWith('-');\n      if (configValueMissing) {\n        if (options.directPolicyMode === 'ignore') continue;\n        const configFlag = arg === LONG_CONFIG_FLAG || arg.startsWith(`${LONG_CONFIG_FLAG}=`)\n          ? LONG_CONFIG_FLAG\n          : CONFIG_FLAG;\n        throw teamWorkerLaunchArgsError(source, `missing value for ${configFlag}`);\n      }\n      if (splitConfig) i += 1;\n\n      const configPolicy = typeof configValue === 'string' ? extractConfigPolicyAssignment(configValue) : null;\n      if (configPolicy) {\n        if (options.directPolicyMode === 'ignore') continue;\n\n        const flag = configPolicy.axis === 'approval' ? TEAM_WORKER_APPROVAL_FLAG : TEAM_WORKER_SANDBOX_FLAG;\n        const value = parseDirectPolicyValue(configPolicy.value, flag, source);\n        if (configPolicy.axis === 'approval') {\n          approvalValue = setDirectPolicyValue(approvalValue, value, 'approval', source);\n        } else {\n          sandboxValue = setDirectPolicyValue(sandboxValue, value, 'sandbox', source);\n        }\n        continue;\n      }\n\n      if (arg === CONFIG_FLAG && splitConfig && typeof configValue === 'string') {","sourceCodeStart":417,"sourceCodeEnd":453,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/team/model-contract.ts#L417-L453","documentation":"A config flag (-c/--config or long form) in worker launch args is missing its value: the following token is undefined, empty, or starts with '-'. Thrown by parseTeamWorkerLaunchArgs unless directPolicyMode is 'ignore'.","triggerScenarios":"Args ending in -c/--config, or the flag followed by another flag, or an empty --config= assignment.","commonSituations":"Env var or inherited args built by string concatenation where the config path variable is empty; mixing short and long config flags incorrectly.","solutions":["Append the config file path after the flag: --config /path/to/config","Verify the config path variable is set and non-empty","Use --config=path form with a non-empty path"],"exampleFix":"# before\nexport OMX_TEAM_WORKER_LAUNCH_ARGS='--config'\n# after\nexport OMX_TEAM_WORKER_LAUNCH_ARGS='--config=/etc/omx/worker.json'","handlingStrategy":"validation","validationCode":"function configFlagHasValue(tokens: string[], i: number, expectsValue: boolean): boolean {\n  if (!expectsValue) return true;\n  const v = tokens[i + 1];\n  return typeof v === 'string' && v.trim() !== '' && !v.trim().startsWith('-');\n}","typeGuard":null,"tryCatchPattern":"try { parseTeamWorkerLaunchArgs(tokens, 'env'); } catch (e) { if (String(e).includes('missing value for')) reportEnvVarIssue(e); else throw e; }","preventionTips":["Always pass a config path with -c/--config","Use --config=path form"],"tags":["team","argument-parsing","config-flag"],"backgroundTag":"invalid-command-line-arguments","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}