{"record":{"id":"3bc2d482178e4d8c","repo":"Yeachan-Heo/oh-my-codex","slug":"unknown-imagegen-continuation-argument-arg","errorCode":null,"errorMessage":"Unknown imagegen continuation argument: ${arg}","messagePattern":"Unknown imagegen continuation argument: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/imagegen/continuation.ts","lineNumber":208,"sourceCode":"      after = arg.slice(\"--after=\".length);\n    } else if (arg === \"--resume-instruction\" || arg === \"--prompt\") {\n      resumeInstruction = readValue(arg);\n    } else if (arg.startsWith(\"--resume-instruction=\")) {\n      resumeInstruction = arg.slice(\"--resume-instruction=\".length);\n    } else if (arg.startsWith(\"--prompt=\")) {\n      resumeInstruction = arg.slice(\"--prompt=\".length);\n    } else if (arg === \"--resume-instruction-file\" || arg === \"--prompt-file\") {\n      resumeInstruction = readFileForCli(readValue(arg));\n    } else if (arg.startsWith(\"--resume-instruction-file=\")) {\n      resumeInstruction = readFileForCli(arg.slice(\"--resume-instruction-file=\".length));\n    } else if (arg.startsWith(\"--prompt-file=\")) {\n      resumeInstruction = readFileForCli(arg.slice(\"--prompt-file=\".length));\n    } else if (arg === \"--actor\") {\n      actor = readValue(arg);\n    } else if (arg.startsWith(\"--actor=\")) {\n      actor = arg.slice(\"--actor=\".length);\n    } else {\n      throw new Error(`Unknown imagegen continuation argument: ${arg}`);\n    }\n  }\n\n  return {\n    sessionId,\n    artifactName: normalizeRequired(artifactName, \"--artifact\"),\n    generatedImagesDir,\n    workDir,\n    after,\n    resumeInstruction,\n    actor,\n    json,\n  };\n}\n\nexport const IMAGEGEN_CONTINUATION_USAGE = [\n  \"Usage:\",\n  \"  omx imagegen continuation <session-id> --artifact <name> [--generated-dir <path>] [--work-dir <path>] [--after <iso|now>] [--prompt <text>|--prompt-file <path>] [--json]\",","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/imagegen/continuation.ts#L190-L226","documentation":"The imagegen continuation arg parser hit an argument that matched none of its known flags, so it rejects the whole invocation naming the unknown token. This prevents silently ignored options.","triggerScenarios":"Passing a flag like --verbose, --dry-run, or a misspelled --artifacts to parseImagegenContinuationArgs; also bare positional extras after the session id.","commonSituations":"Using flags from a different tool version, typos, or copy-pasting commands from docs for another subcommand.","solutions":["Remove the unsupported flag or replace it with a supported one (--json, --artifact, --actor, --prompt-file, ...)","Check the usage text for supported flags in this version","Update the CLI if the flag exists in a newer release"],"exampleFix":"// before\n[\"continuation\",\"s1\",\"--verbose\"]\n// after\n[\"continuation\",\"s1\",\"--json\"]","handlingStrategy":"validation","validationCode":"const KNOWN = new Set(['--json','--artifact','--generated-images-dir','--work-dir','--prompt-file','--prompt','--actor']);\nconst bad = args.filter(a => a.startsWith('--') && !KNOWN.has(a) && ![...KNOWN].some(k => a.startsWith(k+'=')));\nif (bad.length) throw new Error(`unsupported flags: ${bad.join(',')}`);","typeGuard":"function isKnownFlag(a: string): boolean { return a.startsWith('--') && (KNOWN.has(a) || [...KNOWN].some(k => a.startsWith(k+'='))); }","tryCatchPattern":"catch (e) { if ((e as Error).message.startsWith('Unknown imagegen continuation argument')) { /* surface usage to user */ } }","preventionTips":["Validate flags against the usage doc before invoking","Pin tool version in scripts","Reject unknown flags early in wrappers"],"tags":["cli","imagegen","unknown-flag"],"backgroundTag":"unknown-cli-option","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}