Fix Codex exec resume sandbox arg ordering

This commit is contained in:
cc-dan
2026-03-17 03:08:07 +00:00
parent 7c993f1c4a
commit 7ec87714c5
3 changed files with 12 additions and 4 deletions

View File

@@ -16,7 +16,8 @@ function readStdin() {
(async function main() {
const args = process.argv.slice(2);
const isResume = args[0] === 'exec' && args[1] === 'resume';
// cc-web can place `resume` after other `codex exec` options (e.g. --json, -s).
const isResume = args[0] === 'exec' && args.includes('resume');
const threadId = (() => {
if (!isResume) return `mock-${crypto.randomUUID()}`;
for (let i = args.length - 1; i >= 2; i--) {