fix(benchmarks): resume Codex sessions without the rejected --sandbox flag

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian lechnerandClaude Opus 5.5 committed 2026-10-08 10:40:21 +02:00
1 parent af1e248243
commit 0779e5c7db
1 file changed
+3 -2
+3 -2
View File
@@ -122,7 +122,8 @@ def codex_turn(prompt, cwd, arm, args, session):
command = [shutil.which('codex'), 'exec'] command = [shutil.which('codex'), 'exec']
if session: if session:
command += ['resume', session] command += ['resume', session]
command += ['--json', '--skip-git-repo-check', '--sandbox', 'workspace-write', # `exec resume` rejects --sandbox; the config key works for both forms.
command += ['--json', '--skip-git-repo-check', '-c', 'sandbox_mode="workspace-write"',
'-m', args.codex_model, '-c', f'model_reasoning_effort="{args.codex_effort}"'] '-m', args.codex_model, '-c', f'model_reasoning_effort="{args.codex_effort}"']
command += ['-C', str(cwd)] if not session else [] command += ['-C', str(cwd)] if not session else []
command.append('-') command.append('-')
@@ -140,7 +141,7 @@ def codex_turn(prompt, cwd, arm, args, session):
'final': next((str(item.get('text', '')) for item in reversed(items) if item.get('type') == 'agent_message'), ''), 'final': next((str(item.get('text', '')) for item in reversed(items) if item.get('type') == 'agent_message'), ''),
'models': [args.codex_model], 'models': [args.codex_model],
'error': next((str(event.get('message', event.get('error', '')))[:300] for event in events if event.get('type') in ('error', 'turn.failed') 'error': next((str(event.get('message', event.get('error', '')))[:300] for event in events if event.get('type') in ('error', 'turn.failed')
and not str(event.get('message', '')).startswith('Reconnecting')), '') if not usage else '', and not str(event.get('message', '')).startswith('Reconnecting')), 'no turn.completed event') if not usage else '',
} }