Bug
adversarial-review parses --turn-timeout-ms but never applies it. Long PR reviews die at the library default with:
codex turn exceeded the 600000ms turn budget.
Root cause (present in 1.0.6-fork.6)
handleReviewCommand resolves the timeout and puts it on the request (plugins/codex/scripts/codex-companion.mjs:832):
turnTimeoutMs: resolveTurnTimeoutMsFromOptions(options),
The native review branch forwards it (codex-companion.mjs:424):
const result = await runAppServerReview(request.cwd, {
...
turnTimeoutMs: request.turnTimeoutMs,
But the adversarial branch drops it (codex-companion.mjs:465-473):
const result = await runAppServerTurn(context.repoRoot, {
prompt,
model: request.model,
effort: request.effort,
sandbox: "read-only",
outputSchema: readOutputSchema(REVIEW_SCHEMA),
onProgress: request.onProgress,
persistThread: true,
threadName: ...
// turnTimeoutMs missing
});
So resolveTurnTimeoutMs in lib/codex.mjs falls through to DEFAULT_TURN_TIMEOUT_MS = 600000. The only working override today is the CODEX_TURN_TIMEOUT_MS env var (read at call time in lib/codex.mjs:70-73).
Fix
Add one line to the adversarial runAppServerTurn call:
turnTimeoutMs: request.turnTimeoutMs,
making --turn-timeout-ms (and the foreground/background defaults from resolveTurnTimeoutMsFromOptions) effective for adversarial-review, same as review and task.
Repro
node plugins/codex/scripts/codex-companion.mjs adversarial-review --wait --json --turn-timeout-ms 1800000 --base <sha> "review"
on a review that takes >10 min → still fails at exactly 600000ms.
Bug
adversarial-reviewparses--turn-timeout-msbut never applies it. Long PR reviews die at the library default with:Root cause (present in 1.0.6-fork.6)
handleReviewCommandresolves the timeout and puts it on the request (plugins/codex/scripts/codex-companion.mjs:832):The native review branch forwards it (
codex-companion.mjs:424):But the adversarial branch drops it (
codex-companion.mjs:465-473):So
resolveTurnTimeoutMsinlib/codex.mjsfalls through toDEFAULT_TURN_TIMEOUT_MS = 600000. The only working override today is theCODEX_TURN_TIMEOUT_MSenv var (read at call time inlib/codex.mjs:70-73).Fix
Add one line to the adversarial
runAppServerTurncall:making
--turn-timeout-ms(and the foreground/background defaults fromresolveTurnTimeoutMsFromOptions) effective foradversarial-review, same asreviewandtask.Repro
on a review that takes >10 min → still fails at exactly 600000ms.