Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion plugins/codex/scripts/codex-companion.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ async function executeReviewRun(request) {
model: request.model,
sandbox: "read-only",
outputSchema: readOutputSchema(REVIEW_SCHEMA),
onProgress: request.onProgress
onProgress: request.onProgress,
persistThread: true
});
const parsed = parseStructuredOutput(result.finalMessage, {
status: result.status,
Expand Down
2 changes: 1 addition & 1 deletion plugins/codex/scripts/lib/codex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ export async function runAppServerReview(cwd, options = {}) {
const thread = await startThread(client, cwd, {
model: options.model,
sandbox: "read-only",
ephemeral: true,
ephemeral: false,
threadName: options.threadName
});
const sourceThreadId = thread.thread.id;
Expand Down
4 changes: 4 additions & 0 deletions tests/runtime.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ test("review accepts the quoted raw argument style for built-in base-branch revi
assert.equal(result.status, 0);
assert.match(result.stdout, /Reviewed changes against main/);
assert.match(result.stdout, /No material issues found/);
const state = JSON.parse(fs.readFileSync(path.join(binDir, "fake-codex-state.json"), "utf8"));
assert.equal(state.threads[0].ephemeral, false);
});

test("adversarial review renders structured findings over app-server turn/start", () => {
Expand All @@ -384,6 +386,8 @@ test("adversarial review renders structured findings over app-server turn/start"

assert.equal(result.status, 0);
assert.match(result.stdout, /Missing empty-state guard/);
const state = JSON.parse(fs.readFileSync(path.join(binDir, "fake-codex-state.json"), "utf8"));
assert.equal(state.threads[0].ephemeral, false);
});

test("adversarial review accepts the same base-branch targeting as review", () => {
Expand Down