{"record":{"id":"8f800597a0b1f182","repo":"can1357/oh-my-pi","slug":"unknown-security-operation-operationid-8f8005","errorCode":null,"errorMessage":"Unknown security operation: ${operationId}","messagePattern":"Unknown security operation: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/slash-commands/helpers/security.ts","lineNumber":379,"sourceCode":"\t\tswitch (verb || \"scans\") {\n\t\t\tcase \"plan\": {\n\t\t\t\tconst plan = await preflight(runtime, rest);\n\t\t\t\tawait runtime.output(`Security plan ${plan.id} is ready. Fingerprint: ${plan.fingerprint}.`);\n\t\t\t\treturn commandConsumed();\n\t\t\t}\n\t\t\tcase \"scan\": {\n\t\t\t\tconst coordinator = coordinatorFor(runtime);\n\t\t\t\tconst planId = rest.trim().startsWith(\"secplan_\") ? rest.trim() : (await preflight(runtime, rest)).id;\n\t\t\t\tconst operation = await coordinator.start({ planId });\n\t\t\t\tawait runtime.output(`Security scan ${operation.scanId} started as ${operation.operationId}.`);\n\t\t\t\treturn commandConsumed();\n\t\t\t}\n\t\t\tcase \"status\": {\n\t\t\t\tconst coordinator = coordinatorFor(runtime);\n\t\t\t\tconst operationId = rest.trim();\n\t\t\t\tif (operationId) {\n\t\t\t\t\tconst operation = await coordinator.status(operationId);\n\t\t\t\t\tif (!operation) throw new Error(`Unknown security operation: ${operationId}`);\n\t\t\t\t\tawait runtime.output(JSON.stringify(operation, null, 2));\n\t\t\t\t} else {\n\t\t\t\t\tawait runtime.output(JSON.stringify(await coordinator.listOperations(), null, 2));\n\t\t\t\t}\n\t\t\t\treturn commandConsumed();\n\t\t\t}\n\t\t\tcase \"cancel\": {\n\t\t\t\tconst operationId = rest.trim();\n\t\t\t\tif (!operationId) throw new Error(\"cancel requires an operation id\");\n\t\t\t\tawait runtime.output(\n\t\t\t\t\t(await coordinatorFor(runtime).cancel(operationId))\n\t\t\t\t\t\t? `Cancellation requested for ${operationId}.`\n\t\t\t\t\t\t: `No cancellable security operation ${operationId}.`,\n\t\t\t\t);\n\t\t\t\treturn commandConsumed();\n\t\t\t}\n\t\t\tcase \"scans\": {\n\t\t\t\tconst scans = await (await SecurityStore.openForCwd(runtime.cwd)).listScans();","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/slash-commands/helpers/security.ts#L361-L397","documentation":"Thrown by handleSecurityCommand's `status` case when coordinator.status(operationId) returns undefined, meaning no security scan operation with that id is known to the coordinator (no running or completed operation matches). The id here refers to an operation id from a local /security scan run, not a cloud configuration.","triggerScenarios":"Run `/security status secop_does_not_exist`; use an id from a different workspace/session; typographical error in the operation id; the operation record was pruned after session restart.","commonSituations":"Confusing cloud configuration ids (secconf_*) with local operation ids (from `/security scan` output); querying after restarting the CLI so in-memory operations are gone; paste errors with truncated ids.","solutions":["Run `/security status` with no id to list all known operations and copy the exact id.","Verify the id came from `/security scan` output (operationId), not a cloud configuration id.","Re-run the scan if the session restarted and the operation no longer exists.","Check for typos/truncation in the pasted id."],"exampleFix":"// before\n/security status secconf_abc\n// after\n/security status   # list operations, then:\n/security status secop_1234","handlingStrategy":"try-catch","validationCode":"const known = JSON.parse(outputOf(`/security status`)); // list operations\nif (!known.some(op => op.operationId === id)) throw new Error(`unknown operation id: ${id}`);","typeGuard":null,"tryCatchPattern":"try {\n\tawait handleSecurityCommand(cmd, runtime);\n} catch (err) {\n\tif (err instanceof Error && err.message.startsWith(\"Unknown security operation:\")) {\n\t\tawait runtime.output(JSON.stringify(await coordinatorFor(runtime).listOperations(), null, 2));\n\t} else throw err;\n}","preventionTips":["List operations with `/security status` (no id) and copy the exact operationId.","Distinguish local operation ids from cloud configuration ids (secconf_*) — they are not interchangeable.","Re-run `/security scan` after a session restart; operations do not survive across sessions."],"tags":["cli","not-found","lookup"],"backgroundTag":"unknown-resource-id","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}