From 5260987d86edda86c0838e42095425dd2469d4a9 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 18 Apr 2026 06:44:41 +0800 Subject: [PATCH] fix(benchmark): pass --skip-git-repo-check to codex adapter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gpt provider adapter spawns `codex exec -C ` with arbitrary working directories (benchmark temp dirs, non-git paths). Without `--skip-git-repo-check`, codex refuses to run and returns "Not inside a trusted directory" — surfaced as a generic error.code='unknown' that looks like an API failure. Benchmarks don't care about codex's git-repo trust model; we just want the prompt executed. Surfaced by the new provider live E2E test on a temp workdir. Co-Authored-By: Claude Opus 4.7 (1M context) --- test/helpers/providers/gpt.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/helpers/providers/gpt.ts b/test/helpers/providers/gpt.ts index 7dae9fb8..846b8be0 100644 --- a/test/helpers/providers/gpt.ts +++ b/test/helpers/providers/gpt.ts @@ -31,7 +31,10 @@ export class GptAdapter implements ProviderAdapter { async run(opts: RunOpts): Promise { const start = Date.now(); - const args = ['exec', opts.prompt, '-C', opts.workdir, '-s', 'read-only', '--json']; + // `--skip-git-repo-check` lets codex run in arbitrary working directories + // (temp dirs, non-git paths) without the interactive trust prompt. Benchmarks + // often don't care about the workdir — they're just running a prompt. + const args = ['exec', opts.prompt, '-C', opts.workdir, '-s', 'read-only', '--skip-git-repo-check', '--json']; if (opts.model) args.push('-m', opts.model); if (opts.extraArgs) args.push(...opts.extraArgs);