From e400ffdef901acdd309d4b0f88cdea832d524c81 Mon Sep 17 00:00:00 2001 From: lezi-fun <177434121+lezi-fun@users.noreply.github.com> Date: Sat, 16 May 2026 19:19:10 +0800 Subject: [PATCH] Fix Codex CLI runner invocation --- src/review/codexCliReviewer.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/review/codexCliReviewer.ts b/src/review/codexCliReviewer.ts index 980502c..99ea396 100644 --- a/src/review/codexCliReviewer.ts +++ b/src/review/codexCliReviewer.ts @@ -1,5 +1,4 @@ import fs from "node:fs/promises"; -import os from "node:os"; import path from "node:path"; import { execFile } from "node:child_process"; import { promisify } from "node:util"; @@ -35,7 +34,9 @@ export class CodexCliReviewer { mode: ReviewMode; }): Promise { return withRetry("codex.exec.review", async () => { - const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "ghbot-codex-")); + const tempRoot = path.join(process.cwd(), ".ghbot-tmp"); + await fs.mkdir(tempRoot, { recursive: true }); + const tempDir = await fs.mkdtemp(path.join(tempRoot, "codex-")); const schemaPath = path.join(tempDir, "review-schema.json"); const outputPath = path.join(tempDir, "review-output.json"); const codexHome = path.join(tempDir, "codex-home"); @@ -51,8 +52,6 @@ export class CodexCliReviewer { "--skip-git-repo-check", "--sandbox", "workspace-write", - "--ask-for-approval", - "never", "--output-schema", schemaPath, "--output-last-message",