{"record":{"id":"f7c8bed55b56614b","repo":"can1357/oh-my-pi","slug":"cloud-start-requires-repo-id-repo-url-and","errorCode":null,"errorMessage":"cloud start requires --repo-id, --repo-url, and --environment","messagePattern":"cloud start requires --repo-id, --repo-url, and --environment","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/slash-commands/helpers/security.ts","lineNumber":298,"sourceCode":"\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\titem.id,\n\t\t\t\t\t\t\t\t\titem.state ?? \"unknown\",\n\t\t\t\t\t\t\t\t\titem.currentStep ?? \"unknown\",\n\t\t\t\t\t\t\t\t\t`repo=${item.repositoryId}`,\n\t\t\t\t\t\t\t\t\t`environment=${item.environmentId}`,\n\t\t\t\t\t\t\t\t\titem.repositoryUrl,\n\t\t\t\t\t\t\t\t\titem.remainingScans === undefined ? \"\" : `${item.remainingScans} scan(s) remaining`,\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t\t\t\t\t.join(\" \"),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.join(\"\\n\"),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tcase \"start\": {\n\t\t\tif (!options.repositoryId || !options.repositoryUrl || !options.environmentId) {\n\t\t\t\tthrow new Error(\"cloud start requires --repo-id, --repo-url, and --environment\");\n\t\t\t}\n\t\t\tconst configuration = await client.startScan({\n\t\t\t\trepositoryId: options.repositoryId,\n\t\t\t\trepositoryUrl: options.repositoryUrl,\n\t\t\t\tenvironmentId: options.environmentId,\n\t\t\t\tlookbackDays: options.lookbackDays,\n\t\t\t});\n\t\t\tawait runtime.output(\n\t\t\t\t`Codex Security cloud scan ${configuration.id} started for ${configuration.repositoryUrl}. This consumes cloud scan allowance.`,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tcase \"status\": {\n\t\t\tif (!options.configurationId) throw new Error(\"cloud status requires a configuration id\");\n\t\t\tawait runtime.output(JSON.stringify(await client.getStats(options.configurationId), null, 2));\n\t\t\treturn;\n\t\t}\n\t\tcase \"pull\": {","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/slash-commands/helpers/security.ts#L280-L316","documentation":"Thrown by handleCloudCommand's `start` case when any of the three required options — --repo-id, --repo-url, --environment — is missing. The parser leaves them undefined and the handler validates the combination before calling client.startScan, since a cloud scan cannot be configured without all three identifiers.","triggerScenarios":"Run `/security cloud start --repo-id r1 --repo-url https://github.com/org/repo` (missing --environment), or `/security cloud start` with no flags at all.","commonSituations":"Assuming the repo id can be resolved from the URL or cwd; forgetting --environment because local scans don't need one; flags dropped when constructing the command from a script.","solutions":["Supply all three: `--repo-id <id> --repo-url <url> --environment <id>`.","Get valid repository/environment ids from the Codex Security cloud console or `/security cloud scans` output (repo= and environment= fields).","Remember a start consumes cloud scan allowance — configure deliberately."],"exampleFix":"// before\n/security cloud start --repo-id r1 --repo-url https://github.com/org/repo\n// after\n/security cloud start --repo-id r1 --repo-url https://github.com/org/repo --environment env_42","handlingStrategy":"validation","validationCode":"const missing = [\"--repo-id\", \"--repo-url\", \"--environment\"].filter(f => !cmd.includes(f));\nif (missing.length) throw new Error(`cloud start missing: ${missing.join(\" \")}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Collect repositoryId, repositoryUrl, and environmentId before composing the command.","Copy ids from `/security cloud scans` output (repo= and environment= fields).","Remember cloud starts consume scan allowance — script the full flag set, not partial runs."],"tags":["cli","missing-argument","validation"],"backgroundTag":"missing-required-argument","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}