openai/codex-plugin-cc · error · Error
Broker Unix socket endpoint is missing its path.
Error message
Broker Unix socket endpoint is missing its path.
What it means
Thrown by parseBrokerEndpoint when the endpoint starts with 'unix:' but the socket path after the scheme is empty (e.g. 'unix:'). Unix-domain-socket endpoints require an absolute filesystem path to the broker.sock file; a bare 'unix:' names no socket.
Source
Thrown at plugins/codex/scripts/lib/broker-endpoint.mjs:35
}
export function parseBrokerEndpoint(endpoint) {
if (typeof endpoint !== "string" || endpoint.length === 0) {
throw new Error("Missing broker endpoint.");
}
if (endpoint.startsWith("pipe:")) {
const pipePath = endpoint.slice("pipe:".length);
if (!pipePath) {
throw new Error("Broker pipe endpoint is missing its path.");
}
return { kind: "pipe", path: pipePath };
}
if (endpoint.startsWith("unix:")) {
const socketPath = endpoint.slice("unix:".length);
if (!socketPath) {
throw new Error("Broker Unix socket endpoint is missing its path.");
}
return { kind: "unix", path: socketPath };
}
throw new Error(`Unsupported broker endpoint: ${endpoint}`);
}
View on GitHub (pinned to db52e28f4d)
Solutions
- Supply a full unix socket path: 'unix:/tmp/codex-session/broker.sock'.
- Regenerate via createBrokerEndpoint(sessionDir) on non-win32, ensuring sessionDir is a non-empty absolute path.
- Sanity-check the endpoint matches /^unix:\/.+/ before parsing.
- Verify the process has permission to create/read the socket at that path.
Example fix
// before
parseBrokerEndpoint('unix:') // throws
// after
parseBrokerEndpoint('unix:/tmp/codex-1234/broker.sock') Defensive patterns
Strategy: validation
Validate before calling
function isValidUnixEndpoint(endpoint) {
return typeof endpoint === 'string' &&
endpoint.startsWith('unix:') &&
endpoint.slice('unix:'.length).trim().length > 0;
}
// call: if (!isValidUnixEndpoint(endpoint)) regenerate via createBrokerEndpoint(sessionDir); Type guard
null
Try / catch
null
Prevention
- Always derive unix endpoints from createBrokerEndpoint(sessionDir) on non-win32.
- Confirm sessionDir is a non-empty absolute path before joining.
- Persist the full 'unix:<path>' string without trimming the path portion.
- Validate the endpoint with a regex before parsing.
When it happens
Trigger: Calling parseBrokerEndpoint('unix:') or any 'unix:<whitespace>' value. Arises from a config write where path.join(sessionDir,'broker.sock') returned empty (sessionDir was empty) or a user trimmed the path accidentally.
Common situations: Session dir resolved to empty string due to a bad temp-dir calculation. A user manually truncated the endpoint in a config file. Symlink/realpath resolution produced an empty remainder.
Related errors
- Missing broker endpoint.
- Broker pipe endpoint is missing its path.
- Unsupported broker endpoint: ${endpoint}
- codex app-server broker connection is not connected.
- Usage: node scripts/app-server-broker.mjs serve --endpoint <
AI-assisted analysis of openai/codex-plugin-cc@db52e28f4d (2026-08-13).
Data as JSON: /api/errors/8f5b3d075c8b3f9f.
Report an issue: GitHub.