{"record":{"id":"5adb85d181dd40ad","repo":"Yeachan-Heo/oh-my-codex","slug":"setup-agents-merge-policy-flags-do-not-accept-valu-5adb85","errorCode":null,"errorMessage":"Setup AGENTS merge policy flags do not accept values: ${arg}","messagePattern":"Setup AGENTS merge policy flags do not accept values: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/index.ts","lineNumber":558,"sourceCode":"    const arg = args[index];\n    if (arg === \"--merge-agents\" || arg === \"--no-merge-agents\" || arg === \"--clear-merge-agents-policy\") {\n      const next = args[index + 1];\n      if (next && !next.startsWith(\"--\")) {\n        throw new Error(`Setup AGENTS merge policy flags do not accept values: ${arg} ${next}`);\n      }\n      if (arg === \"--merge-agents\") {\n        setPolicy({ kind: \"set\", value: true }, arg);\n      } else if (arg === \"--no-merge-agents\") {\n        setPolicy({ kind: \"set\", value: false }, arg);\n      } else {\n        setPolicy({ kind: \"clear\" }, arg);\n      }\n    } else if (\n      arg.startsWith(\"--merge-agents=\") ||\n      arg.startsWith(\"--no-merge-agents=\") ||\n      arg.startsWith(\"--clear-merge-agents-policy=\")\n    ) {\n      throw new Error(`Setup AGENTS merge policy flags do not accept values: ${arg}`);\n    }\n  }\n  return policy;\n}\n\nexport function resolveSetupMergeAgentsArg(args: string[]): boolean | undefined {\n  const policy = resolveSetupAgentsMergePolicyArg(args);\n  return policy?.kind === \"set\" ? policy.value : undefined;\n}\n\nexport function resolveSetupInstallModeArg(args: string[]): SetupInstallMode | undefined {\n  let value: SetupInstallMode | undefined;\n  const setValue = (next: SetupInstallMode, source: string): void => {\n    if (value && value !== next) {\n      throw new Error(\n        `Conflicting setup install mode flags: ${source} selects ${next}, but another flag already selected ${value}`,\n      );\n    }","sourceCodeStart":540,"sourceCodeEnd":576,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/index.ts#L540-L576","documentation":"The setup AGENTS merge policy flags (--merge-agents, --no-merge-agents, --clear-merge-agents-policy) are boolean switches and do not accept values. Passing them with an inline value via `=` (e.g. --merge-agents=true) throws this error. Use the bare flag or the separate --merge-agents-policy flag to set a policy value.","triggerScenarios":"Running a setup command with `--merge-agents=<value>`, `--no-merge-agents=<value>`, or `--clear-merge-agents-policy=<value>`.","commonSituations":"Users accustomed to `--flag=value` CLI syntax apply it to boolean toggles; scripting generated args with template interpolation producing `--merge-agents=`.","solutions":["Remove the `=value` suffix and use the bare flag (e.g. `--merge-agents`)","To specify a policy value, use the dedicated --merge-agents-policy flag instead","Check shell scripts that quote/append values onto flag names"],"exampleFix":"# before\nomx setup --merge-agents=append\n# after\nomx setup --merge-agents --merge-agents-policy append","handlingStrategy":"validation","validationCode":"const bad = /^(--merge-agents|--no-merge-agents|--clear-merge-agents-policy)=/.test(arg);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always use bare boolean policy flags","Reserve --merge-agents-policy for value input"],"tags":["cli","argument-parsing","setup","agents-merge"],"backgroundTag":"invalid-cli-flag-value","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}