fix: mount codex OAuth credentials into reviewer container
Mount host's ~/.codex (read-only) into container so codex-runner can authenticate via ChatGPT OAuth. Set CODEX_HOME env on exec.
This commit is contained in:
@@ -321,6 +321,16 @@ export function buildReviewerMounts(
|
|||||||
readonly: false,
|
readonly: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Codex OAuth: mount host's ~/.codex (read-only) so codex-runner can authenticate
|
||||||
|
const hostCodexHome = process.env.CODEX_HOME || path.join(os.homedir(), '.codex');
|
||||||
|
if (fs.existsSync(hostCodexHome)) {
|
||||||
|
mounts.push({
|
||||||
|
hostPath: hostCodexHome,
|
||||||
|
containerPath: '/home/node/.codex',
|
||||||
|
readonly: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return mounts;
|
return mounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -485,6 +495,9 @@ export async function runReviewerContainer(args: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const isCodexAgent = (group.agentType || 'claude-code') === 'codex';
|
const isCodexAgent = (group.agentType || 'claude-code') === 'codex';
|
||||||
|
if (isCodexAgent) {
|
||||||
|
execArgs.push('-e', 'CODEX_HOME=/home/node/.codex');
|
||||||
|
}
|
||||||
const runnerPath = isCodexAgent
|
const runnerPath = isCodexAgent
|
||||||
? '/app/codex/dist/index.js'
|
? '/app/codex/dist/index.js'
|
||||||
: '/app/agent/dist/index.js';
|
: '/app/agent/dist/index.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user