@@ -68,7 +68,7 @@ const ROOT_DIR = path.resolve(fileURLToPath(new URL("..", import.meta.url)));
6868const REVIEW_SCHEMA = path . join ( ROOT_DIR , "schemas" , "review-output.schema.json" ) ;
6969const DEFAULT_STATUS_WAIT_TIMEOUT_MS = 240000 ;
7070const DEFAULT_STATUS_POLL_INTERVAL_MS = 2000 ;
71- const VALID_REASONING_EFFORTS = new Set ( [ "none" , "minimal" , "low" , "medium" , "high" , "xhigh" ] ) ;
71+ const VALID_REASONING_EFFORTS = new Set ( [ "none" , "minimal" , "low" , "medium" , "high" , "xhigh" , "max" , "ultra" ] ) ;
7272const MODEL_ALIASES = new Map ( [ [ "spark" , "gpt-5.3-codex-spark" ] ] ) ;
7373const STOP_REVIEW_TASK_MARKER = "Run a stop-gate review of the previous Claude turn." ;
7474
@@ -77,9 +77,9 @@ function printUsage() {
7777 [
7878 "Usage:" ,
7979 " node scripts/codex-companion.mjs setup [--enable-review-gate|--disable-review-gate] [--json]" ,
80- " node scripts/codex-companion.mjs review [--wait|--background] [--base <ref>] [--scope <auto|working-tree|branch>]" ,
81- " node scripts/codex-companion.mjs adversarial-review [--wait|--background] [--base <ref>] [--scope <auto|working-tree|branch>] [focus text]" ,
82- " node scripts/codex-companion.mjs task [--background] [--write] [--resume-last|--resume|--fresh] [--model <model|spark>] [--effort <none|minimal|low|medium|high|xhigh>] [prompt]" ,
80+ " node scripts/codex-companion.mjs review [--wait|--background] [--base <ref>] [--scope <auto|working-tree|branch>] [--model <model|spark>] [--effort <none|minimal|low|medium|high|xhigh|max|ultra>] " ,
81+ " node scripts/codex-companion.mjs adversarial-review [--wait|--background] [--base <ref>] [--scope <auto|working-tree|branch>] [--model <model|spark>] [--effort <none|minimal|low|medium|high|xhigh|max|ultra>] [ focus text]" ,
82+ " node scripts/codex-companion.mjs task [--background] [--write] [--resume-last|--resume|--fresh] [--model <model|spark>] [--effort <none|minimal|low|medium|high|xhigh|max|ultra >] [prompt]" ,
8383 " node scripts/codex-companion.mjs transfer [--source <claude-jsonl>] [--json]" ,
8484 " node scripts/codex-companion.mjs status [job-id] [--all] [--json]" ,
8585 " node scripts/codex-companion.mjs result [job-id] [--json]" ,
@@ -121,7 +121,7 @@ function normalizeReasoningEffort(effort) {
121121 }
122122 if ( ! VALID_REASONING_EFFORTS . has ( normalized ) ) {
123123 throw new Error (
124- `Unsupported reasoning effort "${ effort } ". Use one of: none, minimal, low, medium, high, xhigh.`
124+ `Unsupported reasoning effort "${ effort } ". Use one of: none, minimal, low, medium, high, xhigh, max, ultra .`
125125 ) ;
126126 }
127127 return normalized ;
@@ -355,6 +355,11 @@ async function resolveLatestTrackedTaskThread(cwd, options = {}) {
355355 return findLatestTaskThread ( workspaceRoot ) ;
356356}
357357
358+ function buildReviewThreadName ( request ) {
359+ const scope = request . base ? ` vs ${ request . base } ` : "" ;
360+ return `Codex ${ request . reviewName ?? "Review" } ${ scope } ` ;
361+ }
362+
358363async function executeReviewRun ( request ) {
359364 ensureCodexAvailable ( request . cwd ) ;
360365 ensureGitRepository ( request . cwd ) ;
@@ -370,6 +375,8 @@ async function executeReviewRun(request) {
370375 const result = await runAppServerReview ( request . cwd , {
371376 target : reviewTarget ,
372377 model : request . model ,
378+ effort : request . effort ,
379+ threadName : buildReviewThreadName ( request ) ,
373380 onProgress : request . onProgress
374381 } ) ;
375382 const payload = {
@@ -411,6 +418,9 @@ async function executeReviewRun(request) {
411418 const result = await runAppServerTurn ( context . repoRoot , {
412419 prompt,
413420 model : request . model ,
421+ effort : request . effort ,
422+ persistThread : true ,
423+ threadName : buildReviewThreadName ( request ) ,
414424 sandbox : "read-only" ,
415425 outputSchema : readOutputSchema ( REVIEW_SCHEMA ) ,
416426 onProgress : request . onProgress
@@ -711,7 +721,7 @@ function enqueueBackgroundTask(cwd, job, request) {
711721
712722async function handleReviewCommand ( argv , config ) {
713723 const { options, positionals } = parseCommandInput ( argv , {
714- valueOptions : [ "base" , "scope" , "model" , "cwd" ] ,
724+ valueOptions : [ "base" , "scope" , "model" , "effort" , " cwd"] ,
715725 booleanOptions : [ "json" , "background" , "wait" ] ,
716726 aliasMap : {
717727 m : "model"
@@ -744,6 +754,7 @@ async function handleReviewCommand(argv, config) {
744754 base : options . base ,
745755 scope : options . scope ,
746756 model : options . model ,
757+ effort : normalizeReasoningEffort ( options . effort ) ,
747758 focusText,
748759 reviewName : config . reviewName ,
749760 onProgress : progress
0 commit comments