MCPcopy
hub / github.com/openai/codex-plugin-cc / getSessionRuntimeStatus

Function getSessionRuntimeStatus

plugins/codex/scripts/lib/codex.mjs:906–923  ·  view source on GitHub ↗
(env = process.env, cwd = process.cwd())

Source from the content-addressed store, hash-verified

904}
905
906export function getSessionRuntimeStatus(env = process.env, cwd = process.cwd()) {
907 const endpoint = env?.[BROKER_ENDPOINT_ENV] ?? loadBrokerSession(cwd)?.endpoint ?? null;
908 if (endpoint) {
909 return {
910 mode: "shared",
911 label: "shared session",
912 detail: "This Claude session is configured to reuse one shared Codex runtime.",
913 endpoint
914 };
915 }
916
917 return {
918 mode: "direct",
919 label: "direct startup",
920 detail: "No shared Codex runtime is active yet. The first review or task command will start one on demand.",
921 endpoint: null
922 };
923}
924
925export async function getCodexAuthStatus(cwd, options = {}) {
926 const availability = getCodexAvailability(cwd);

Callers 2

buildSetupReportFunction · 0.90
buildStatusSnapshotFunction · 0.90

Calls 1

loadBrokerSessionFunction · 0.90

Tested by

no test coverage detected