{"record":{"id":"7213289d0f2cbd50","repo":"Yeachan-Heo/oh-my-codex","slug":"missing-value-after-actor","errorCode":null,"errorMessage":"Missing value after --actor","messagePattern":"Missing value after --actor","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"src/exec/followup.ts","lineNumber":390,"sourceCode":"    if (arg === \"--json\") {\n      json = true;\n    } else if (arg === \"--prompt\") {\n      const value = rest[i + 1];\n      if (!value) throw new Error(\"Missing value after --prompt\");\n      prompt = value;\n      i += 1;\n    } else if (arg.startsWith(\"--prompt=\")) {\n      prompt = arg.slice(\"--prompt=\".length);\n    } else if (arg === \"--prompt-file\") {\n      const value = rest[i + 1];\n      if (!value) throw new Error(\"Missing path after --prompt-file\");\n      prompt = readFileSyncForCli(value);\n      i += 1;\n    } else if (arg.startsWith(\"--prompt-file=\")) {\n      prompt = readFileSyncForCli(arg.slice(\"--prompt-file=\".length));\n    } else if (arg === \"--actor\") {\n      const value = rest[i + 1];\n      if (!value) throw new Error(\"Missing value after --actor\");\n      actor = value;\n      i += 1;\n    } else if (arg.startsWith(\"--actor=\")) {\n      actor = arg.slice(\"--actor=\".length);\n    } else if (!arg.startsWith(\"-\") && !prompt) {\n      prompt = [arg, ...rest.slice(i + 1)].join(\" \");\n      break;\n    } else {\n      throw new Error(`Unknown exec inject argument: ${arg}`);\n    }\n  }\n  return { sessionId, prompt, actor, json };\n}\n\nfunction readFileSyncForCli(path: string): string {\n  return readFileSync(path, \"utf-8\");\n}\n","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/exec/followup.ts#L372-L408","documentation":"Usage error from parseExecInjectArgs when `--actor` is the last token with no following value. The parser reads the next token as the actor name and throws when there is none.","triggerScenarios":"Ending the command with a bare `--actor`; passing `--actor \"$USER_NAME\"` where the variable is empty in strict-arg scripts; shell quoting consuming the following token.","commonSituations":"Actor name sourced from an env var unset in CI (e.g. no USER/CI_USER set); copied command trimmed of its value; multiline CI command where the value line was dropped.","solutions":["Provide the actor: `--actor ci-bot` or `--actor=ci-bot`.","Default the variable first: `--actor \"${ACTOR:-ci-bot}\"`.","Use the --actor= form to make value pairing explicit.","Note --actor is optional; omit it entirely to fall back to $USER/$USERNAME or 'unknown'."],"exampleFix":"# before\nomx exec inject \"$SESSION_ID\" --prompt \"hi\" --actor\n\n# after\nomx exec inject \"$SESSION_ID\" --prompt \"hi\" --actor \"${ACTOR:-ci-bot}\"","handlingStrategy":"validation","validationCode":"const actor = process.env.ACTOR?.trim() || 'ci-bot';\nrunCli(['exec', 'inject', sessionId, '--prompt', text, '--actor', actor]);","typeGuard":null,"tryCatchPattern":"catch (e) { if (e instanceof Error && e.message === 'Missing value after --actor') { console.error('usage: --actor <name> or --actor=<name>'); process.exit(2); } throw e; }","preventionTips":["Default actor env vars in CI (or omit --actor entirely).","Use --actor=name form in generated command lines."],"tags":["cli","usage-error","argument-parsing","missing-value"],"backgroundTag":"missing-cli-option-value","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}