Skip to content

Commit 15490d7

Browse files
author
Joshua Chittick
committed
fix: apply codex sandbox before resume
1 parent 91db829 commit 15490d7

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/agents/codex/client.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,7 @@ export function buildCodexCommandArgs(params: {
120120
model?: string;
121121
planMode?: boolean;
122122
}): string[] {
123-
const args = [
124-
"exec",
125-
"resume",
126-
"--json",
127-
"--skip-git-repo-check",
128-
];
123+
const args = ["exec", "--json", "--skip-git-repo-check"];
129124
if (params.planMode) {
130125
args.push("--sandbox", "read-only");
131126
} else {
@@ -134,7 +129,7 @@ export function buildCodexCommandArgs(params: {
134129
if (params.model) {
135130
args.push("--model", params.model);
136131
}
137-
args.push(params.sessionId, params.prompt);
132+
args.push("resume", params.sessionId, params.prompt);
138133
return args;
139134
}
140135

packages/agents/test/cli-command.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ describe("agent cli command formatting", () => {
8282
});
8383
const command = buildCodexCommand(args);
8484

85-
expect(command).toContain("codex exec resume");
85+
expect(command).toContain("codex exec --json --skip-git-repo-check");
8686
expect(command).toContain("--json");
8787
expect(command).toContain("--full-auto");
8888
expect(command).toContain("--model gpt-5-codex");
@@ -99,7 +99,7 @@ describe("agent cli command formatting", () => {
9999
});
100100
const command = buildCodexCommand(args);
101101

102-
expect(command).toContain("codex exec resume");
102+
expect(command).toContain("codex exec --json --skip-git-repo-check");
103103
expect(command).toContain("--json");
104104
expect(command).toContain("--sandbox read-only");
105105
expect(command).not.toContain("--full-auto");

0 commit comments

Comments
 (0)