{"record":{"id":"aed4103a4f260deb","repo":"openclaw/openclaw","slug":"codex-supervision-compatibility-tools-require-an-o","errorCode":null,"errorMessage":"Codex supervision compatibility tools require an owner-authorized sender.","messagePattern":"Codex supervision compatibility tools require an owner-authorized sender\\.","errorType":"validation","errorClass":"CodexSupervisionPolicyError","httpStatus":null,"severity":"error","filePath":"extensions/codex/src/supervision-tools.ts","lineNumber":909,"sourceCode":"      return sanitized;\n    }),\n    errors: includeTranscriptDerivedFields\n      ? redactCodexSupervisionValue(result.errors)\n      : result.errors.map(({ endpointId, ok }) => ({ endpointId, ok })),\n  };\n}\n\nfunction requireSupervisionEnabled(pluginConfig: unknown): void {\n  if (readCodexPluginConfig(pluginConfig).supervision?.enabled !== true) {\n    throw new CodexSupervisionPolicyError(\n      \"Codex supervision is disabled in the codex plugin config.\",\n    );\n  }\n}\n\nfunction requireOwnerAccess(options: CodexSupervisionToolsOptions): void {\n  if (!options.senderIsOwner) {\n    throw new CodexSupervisionPolicyError(\n      \"Codex supervision compatibility tools require an owner-authorized sender.\",\n    );\n  }\n}\n\nfunction resolveToolPolicy(\n  options: CodexSupervisionToolsOptions,\n  pluginConfig: unknown,\n): {\n  allowRawTranscripts: boolean;\n  allowWriteControls: boolean;\n} {\n  const config = readCodexPluginConfig(pluginConfig).supervision;\n  const env = options.env ?? process.env;\n  return {\n    allowRawTranscripts:\n      config?.allowRawTranscripts === true ||\n      (options.useLegacyMcpPolicyEnv === true &&","sourceCodeStart":891,"sourceCodeEnd":927,"githubUrl":"https://github.com/openclaw/openclaw/blob/01804a75319da4b69c9ab98ceaa30477e22b8c0b/extensions/codex/src/supervision-tools.ts#L891-L927","documentation":"Thrown as a CodexSupervisionPolicyError by requireOwnerAccess when senderIsOwner is false. Only the trusted owner may use supervision tools because they expose raw transcripts and write controls. requireOwnerAccess runs before any tool work in requireLiveToolPolicy.","triggerScenarios":"A non-owner sender (or a plugin tool context that did not receive senderIsOwner:true) triggers any supervision tool.","commonSituations":"Plugin tool context not propagating the owner bit; invoking the tools from a non-owner session or channel; factory wiring mistake.","solutions":["Ensure the tool context sets senderIsOwner:true only for the owner identity.","Run the tools from an owner-authorized session.","Do not install/expose supervision tools on non-owner channels."],"exampleFix":"// before\ncreateCodexSupervisionTools({ ..., senderIsOwner: false })\n// after\ncreateCodexSupervisionTools({ ..., senderIsOwner: true })","handlingStrategy":"validation","validationCode":"if (!options.senderIsOwner) {\n  return []; // do not install supervision tools for non-owner contexts\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate tool installation on senderIsOwner at factory time; return an empty tool list for non-owner contexts.","Do not propagate supervision tools to non-owner channels.","Run the tools only from owner-authorized sessions."],"tags":["codex","policy","authorization","owner"],"backgroundTag":null,"analyzedSha":"01804a75319da4b69c9ab98ceaa30477e22b8c0b","analyzedAt":"2026-08-12T04:37:58.197Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}