fix(benchmark): pass --skip-git-repo-check to codex adapter

The gpt provider adapter spawns `codex exec -C <workdir>` 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) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-04-18 06:44:41 +08:00
parent 8f65bedf2e
commit 5260987d86
+4 -1
View File
@@ -31,7 +31,10 @@ export class GptAdapter implements ProviderAdapter {
async run(opts: RunOpts): Promise<RunResult> {
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);