{"record":{"id":"f6c49e03bacfec46","repo":"openai/codex-plugin-cc","slug":"unsupported-broker-endpoint-endpoint","errorCode":null,"errorMessage":"Unsupported broker endpoint: ${endpoint}","messagePattern":"Unsupported broker endpoint: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"plugins/codex/scripts/lib/broker-endpoint.mjs","lineNumber":40,"sourceCode":"  }\n\n  if (endpoint.startsWith(\"pipe:\")) {\n    const pipePath = endpoint.slice(\"pipe:\".length);\n    if (!pipePath) {\n      throw new Error(\"Broker pipe endpoint is missing its path.\");\n    }\n    return { kind: \"pipe\", path: pipePath };\n  }\n\n  if (endpoint.startsWith(\"unix:\")) {\n    const socketPath = endpoint.slice(\"unix:\".length);\n    if (!socketPath) {\n      throw new Error(\"Broker Unix socket endpoint is missing its path.\");\n    }\n    return { kind: \"unix\", path: socketPath };\n  }\n\n  throw new Error(`Unsupported broker endpoint: ${endpoint}`);\n}\n","sourceCodeStart":22,"sourceCodeEnd":42,"githubUrl":"https://github.com/openai/codex-plugin-cc/blob/db52e28f4d9ded852ab3942cea316258ae4ef346/plugins/codex/scripts/lib/broker-endpoint.mjs#L22-L42","documentation":"Thrown by parseBrokerEndpoint when the endpoint string does not begin with either the 'pipe:' or 'unix:' scheme. The parser only knows these two transports (Windows named pipe and POSIX unix socket), so any other prefix is unparseable.","triggerScenarios":"Calling parseBrokerEndpoint with a value like 'tcp://127.0.0.1:8080', 'http://...', 'ws://...', or a bare path '/tmp/broker.sock' (missing the 'unix:' scheme). Also triggered by typos like 'unixs:' or 'pipe =' with a space.","commonSituations":"A user tried to force a TCP/HTTP broker transport that the runtime does not support. Copy-pasting an endpoint from a different tool. A leading space or BOM character breaks the startsWith checks.","solutions":["Prefix filesystem socket paths with 'unix:' and named pipes with 'pipe:'.","If you need TCP transport, that is unsupported by this runtime; remove the custom endpoint and let createBrokerEndpoint pick a local socket/pipe.","Trim whitespace and strip BOM from the endpoint string before parsing.","Always obtain endpoints from createBrokerEndpoint rather than constructing scheme strings by hand."],"exampleFix":"// before\nparseBrokerEndpoint('/tmp/codex/broker.sock') // throws (no scheme)\nparseBrokerEndpoint('tcp://127.0.0.1:8080') // throws (unsupported scheme)\n\n// after\nparseBrokerEndpoint('unix:/tmp/codex/broker.sock')","handlingStrategy":"validation","validationCode":"const BROKER_SCHEMES = ['unix:', 'pipe:'];\nfunction hasSupportedScheme(endpoint) {\n  return typeof endpoint === 'string' &&\n    BROKER_SCHEMES.some((s) => endpoint.startsWith(s));\n}\n// call: if (!hasSupportedScheme(endpoint)) throw new Error('Use createBrokerEndpoint to produce a valid endpoint');","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Only accept endpoints produced by createBrokerEndpoint.","Do not attempt TCP/HTTP/ws transports; they are unsupported by this runtime.","Trim whitespace and strip BOM from config-supplied endpoints before parsing.","Document that the only valid schemes are 'unix:' and 'pipe:'."],"tags":["broker","transport","validation"],"backgroundTag":null,"analyzedSha":"db52e28f4d9ded852ab3942cea316258ae4ef346","analyzedAt":"2026-08-13T05:13:20.855Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}