v1.91.94.0 feat(codex): --effort <level> overrides reasoning effort for one run (#3146) (#3151)

* feat(codex): --effort <level> sets GSTACK_CODEX_EFFORT for one run

/codex review --effort medium (or --effort=medium) prefixes each
run-with-timeout dispatch with GSTACK_CODEX_EFFORT=<level>, which outranks
codex_effort and the per-mode default; --xhigh becomes shorthand for
--effort xhigh. The probe keeps owning validation. A missing value, a value
that is not one lowercase word, or conflicting flags stop instead of falling
back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(codex): per-run effort prefix reaches the rendered /codex review dispatch

Runs the rendered review fence against the fake codex: no prefix uses
codex_effort, GSTACK_CODEX_EFFORT=medium|xhigh wins over it, an unknown level
never reaches codex. Step 1 check pins --effort tokens and the stop rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(codex): document codex_effort and --effort; Challenge runs at high, not xhigh

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(changelog): [Unreleased] entry for /codex --effort

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(codex): --effort reaches the probe as an allowlisted request level, parsed before the mode and checked before the paid probe

The level now travels as run-with-timeout --request-effort '<effort-level>'
(placeholder grammar ^[a-z]*$) instead of an agent-built env prefix, and the
probe names /codex --effort when it rejects one. Effort flags count only right
after /codex or its mode word and are removed before mode detection. Step 0.5
runs check-effort before probe-model, so a bad level makes no Codex call even
on a cold cache. Tests cover all five dispatch fences and the zero-call cases.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs(codex): per-request --effort in model-policy, CHANGELOG behavior changes, TODOS follow-ups

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* chore: stamp v1.91.93.0

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(codex): effort flags sit among /codex's leading flags; the probe names an unfilled '<effort-level>' placeholder

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs(codex): per-request row in the effort precedence table, in-tool help names /codex --effort, late-flag notice

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(codex): binding tripwire sees the request-effort dispatch; valid and unfilled levels through Step 0.5 and every fence; doc accuracy

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: John Nunemaker <nunemaker@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-10-12 13:17:02 -07:00
1 parent e23f7b807f
commit 70fab3e246
26 files changed
+257 -86

No files matched your search

+18 -16
View File
@@ -483,10 +483,17 @@ Only for an explicit `--role plan-review` (e.g. `/codex challenge --role plan-re
set `_CODEX_ROLE='plan-review'` below and in the mode block; the mode block then
probes and dispatches the policy model within its own timeout. [Policy setup](https://github.com/garrytan/gstack/blob/main/docs/model-policy.md).
**Effort flags, read before the mode:** `--effort <level>`, `--effort=<level>` or `--xhigh`
(= `--effort xhigh`) directly after `/codex` or its mode word, among its leading flags
(`-m`, `--model`, `--role`) and before any prompt text, set `<effort-level>` (else `''`);
remove them before Step 1. A later `--effort` is prompt text; if a level follows, say so. Missing
value, not one lowercase word, or differing levels: stop, name the levels; nothing is sent.
```bash
_CODEX_PROBE=~/.claude/skills/gstack/bin/gstack-codex-probe
_CODEX_ROLE=''
[ -x "$_CODEX_PROBE" ] || { echo "HELPER_UNAVAILABLE"; exit 1; }
"$_CODEX_PROBE" check-effort high --request '<effort-level>' >/dev/null || exit 1 # free
# GSTACK_ACTIVE_HOST names the harness, never the model.
if { [ -n "${CODEX_THREAD_ID:-}" ] || [ -n "${CODEX_SANDBOX:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = codex ]; }; then
@@ -507,6 +514,8 @@ fi
"$_CODEX_PROBE" check-version # warns if known-bad, non-blocking
```
If `check-effort` failed, relay its lines and stop; no Codex call was made.
If the runtime guard reports a harness mismatch, stop. Outside coverage is unavailable. Repair with `./setup --host codex`; do not silently substitute another provider or force a same-harness invocation.
If the output contains `HELPER_UNAVAILABLE`, stop: `gstack-codex-probe` is missing or
@@ -570,7 +579,7 @@ After this, every subsequent bash block in this skill uses `"$PLAN_ROOT"` and
## Step 1: Detect mode
Parse the user's input to determine which mode to run:
Parse the input, effort flags removed, to determine which mode to run:
1. `/codex review` or `/codex review <instructions>` — **Review mode** (Step 2A)
2. `/codex challenge` or `/codex challenge <focus>` — **Challenge mode** (Step 2B)
@@ -596,11 +605,8 @@ The three modes are MUTUALLY EXCLUSIVE — at most one runs per invocation. Once
the mode is determined, read ONLY that mode's section (see the Section index
above); never read the other two mode sections.
**Reasoning effort override:** If the user's input contains `--xhigh` anywhere,
note it and remove it from the prompt text before passing to Codex. When `--xhigh`
is present, prefix the `run-with-timeout` dispatch with `GSTACK_CODEX_EFFORT=xhigh`,
which outranks `codex_effort` and the per-mode default. Otherwise `--effort` applies
`GSTACK_CODEX_EFFORT`, then `codex_effort`, then the per-mode defaults:
**Reasoning effort:** each dispatch passes `--request-effort '<effort-level>'`, which
outranks `GSTACK_CODEX_EFFORT`, then `codex_effort`, then the per-mode defaults:
- Review (2A): `high` — bounded diff input, needs thoroughness
- Challenge (2B): `high` — adversarial but bounded by diff
- Consult (2C): `medium` — large context, interactive, needs speed
@@ -788,18 +794,14 @@ Native `codex review` selects with `review` and sets both `model` and `review_mo
flag also keeps installed skills out of Codex's context, so a review cannot become a
nested skill run.
**Reasoning effort (per-mode defaults):**
- **Review (2A):** `high` — bounded diff input, needs thoroughness but not max tokens
- **Challenge (2B):** `high` — adversarial but bounded by diff size
- **Consult (2C):** `medium` — large context (plans, codebase), interactive, needs speed
`run-with-timeout --effort <default>` resolves `GSTACK_CODEX_EFFORT`, then `gstack-config
set codex_effort <level>`, then the default; an invalid value stops before any Codex call.
**Reasoning effort** (defaults in Step 1): `run-with-timeout --effort <default>` resolves
`--request-effort`, `GSTACK_CODEX_EFFORT`, `codex_effort`, then the default; an invalid
value stops before any Codex call.
`--user-invoked` runs even with `codex_reviews` disabled: the user asked by name.
`xhigh` uses ~23x more tokens than `high` and causes 50+ minute hangs on large context
tasks (OpenAI issues #8545, #8402, #6931). Users can override with `--xhigh` flag
(e.g., `/codex review --xhigh`) when they want maximum reasoning and are willing to wait.
Override one run with `--effort <level>` (`/codex review --effort medium`). `xhigh`
uses ~23x more tokens than `high` and causes 50+ minute hangs on large context tasks
(OpenAI issues #8545, #8402, #6931).
**Web search:** All codex commands pass `-c 'web_search="cached"'` so `codex exec`
invocations can look up docs and APIs during review. This is OpenAI's cached index —
+18 -16
View File
@@ -77,10 +77,17 @@ Only for an explicit `--role plan-review` (e.g. `/codex challenge --role plan-re
set `_CODEX_ROLE='plan-review'` below and in the mode block; the mode block then
probes and dispatches the policy model within its own timeout. [Policy setup](https://github.com/garrytan/gstack/blob/main/docs/model-policy.md).
**Effort flags, read before the mode:** `--effort <level>`, `--effort=<level>` or `--xhigh`
(= `--effort xhigh`) directly after `/codex` or its mode word, among its leading flags
(`-m`, `--model`, `--role`) and before any prompt text, set `<effort-level>` (else `''`);
remove them before Step 1. A later `--effort` is prompt text; if a level follows, say so. Missing
value, not one lowercase word, or differing levels: stop, name the levels; nothing is sent.
```bash
_CODEX_PROBE=~/.claude/skills/gstack/bin/gstack-codex-probe
_CODEX_ROLE=''
[ -x "$_CODEX_PROBE" ] || { echo "HELPER_UNAVAILABLE"; exit 1; }
"$_CODEX_PROBE" check-effort high --request '<effort-level>' >/dev/null || exit 1 # free
{{OUTSIDE_SELF_GUARD:codex}}
if ! "$_CODEX_PROBE" check-auth >/dev/null; then
@@ -92,6 +99,8 @@ fi
"$_CODEX_PROBE" check-version # warns if known-bad, non-blocking
```
If `check-effort` failed, relay its lines and stop; no Codex call was made.
If the runtime guard reports a harness mismatch, stop. Outside coverage is unavailable. Repair with `./setup --host codex`; do not silently substitute another provider or force a same-harness invocation.
If the output contains `HELPER_UNAVAILABLE`, stop: `gstack-codex-probe` is missing or
@@ -155,7 +164,7 @@ After this, every subsequent bash block in this skill uses `"$PLAN_ROOT"` and
## Step 1: Detect mode
Parse the user's input to determine which mode to run:
Parse the input, effort flags removed, to determine which mode to run:
1. `/codex review` or `/codex review <instructions>` — **Review mode** (Step 2A)
2. `/codex challenge` or `/codex challenge <focus>` — **Challenge mode** (Step 2B)
@@ -181,11 +190,8 @@ The three modes are MUTUALLY EXCLUSIVE — at most one runs per invocation. Once
the mode is determined, read ONLY that mode's section (see the Section index
above); never read the other two mode sections.
**Reasoning effort override:** If the user's input contains `--xhigh` anywhere,
note it and remove it from the prompt text before passing to Codex. When `--xhigh`
is present, prefix the `run-with-timeout` dispatch with `GSTACK_CODEX_EFFORT=xhigh`,
which outranks `codex_effort` and the per-mode default. Otherwise `--effort` applies
`GSTACK_CODEX_EFFORT`, then `codex_effort`, then the per-mode defaults:
**Reasoning effort:** each dispatch passes `--request-effort '<effort-level>'`, which
outranks `GSTACK_CODEX_EFFORT`, then `codex_effort`, then the per-mode defaults:
- Review (2A): `high` — bounded diff input, needs thoroughness
- Challenge (2B): `high` — adversarial but bounded by diff
- Consult (2C): `medium` — large context, interactive, needs speed
@@ -248,18 +254,14 @@ Native `codex review` selects with `review` and sets both `model` and `review_mo
flag also keeps installed skills out of Codex's context, so a review cannot become a
nested skill run.
**Reasoning effort (per-mode defaults):**
- **Review (2A):** `high` — bounded diff input, needs thoroughness but not max tokens
- **Challenge (2B):** `high` — adversarial but bounded by diff size
- **Consult (2C):** `medium` — large context (plans, codebase), interactive, needs speed
`run-with-timeout --effort <default>` resolves `GSTACK_CODEX_EFFORT`, then `gstack-config
set codex_effort <level>`, then the default; an invalid value stops before any Codex call.
**Reasoning effort** (defaults in Step 1): `run-with-timeout --effort <default>` resolves
`--request-effort`, `GSTACK_CODEX_EFFORT`, `codex_effort`, then the default; an invalid
value stops before any Codex call.
`--user-invoked` runs even with `codex_reviews` disabled: the user asked by name.
`xhigh` uses ~23x more tokens than `high` and causes 50+ minute hangs on large context
tasks (OpenAI issues #8545, #8402, #6931). Users can override with `--xhigh` flag
(e.g., `/codex review --xhigh`) when they want maximum reasoning and are willing to wait.
Override one run with `--effort <level>` (`/codex review --effort medium`). `xhigh`
uses ~23x more tokens than `high` and causes 50+ minute hangs on large context tasks
(OpenAI issues #8545, #8402, #6931).
**Web search:** All codex commands pass `{{CODEX_WEB_SEARCH_FLAG}}` so `codex exec`
invocations can look up docs and APIs during review. This is OpenAI's cached index —
+1 -1
View File
@@ -55,7 +55,7 @@ if [ -n "$_CODEX_ROLE" ]; then export _CODEX_DEADLINE=$(($(date +%s)+540)); _COD
else _CODEX_OUT=$("$_CODEX_PROBE" select-model exec) || exit 1; fi
_CODEX_SEL=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SEL: //p')
_CODEX_SANDBOX_MODE=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SANDBOX: //p')
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high 540 codex exec - -C "$_REPO_ROOT" -s "${_CODEX_SANDBOX_MODE:?}" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR" | tee "$TMPRESP.events" | PYTHONUNBUFFERED=1 "$PYTHON_CMD" -u -c "
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high --request-effort '<effort-level>' 540 codex exec - -C "$_REPO_ROOT" -s "${_CODEX_SANDBOX_MODE:?}" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR" | tee "$TMPRESP.events" | PYTHONUNBUFFERED=1 "$PYTHON_CMD" -u -c "
import sys, json
turn_completed_count = 0
turn_failed = False
+1 -1
View File
@@ -41,7 +41,7 @@ fi
[ -n "${TMPERR:-}" ] || TMPERR=$(mktemp "$TMP_ROOT/codex-err-XXXXXX") || { echo "ERROR: mktemp failed in TMP_ROOT=$TMP_ROOT; not running codex without its temp file" >&2; exit 1; }
TMPRESP=$(mktemp "$TMP_ROOT/codex-resp-XXXXXX") || { echo "ERROR: mktemp failed in TMP_ROOT=$TMP_ROOT; not running codex without its temp file" >&2; exit 1; }
{{CODEX_SELECT:exec:540}}
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high 540 codex exec - -C "$_REPO_ROOT" -s "${_CODEX_SANDBOX_MODE:?}" {{CODEX_MODEL_CONFIG_FLAG}} {{CODEX_WEB_SEARCH_FLAG}} --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR" | tee "$TMPRESP.events" | PYTHONUNBUFFERED=1 "$PYTHON_CMD" -u -c "
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high --request-effort '<effort-level>' 540 codex exec - -C "$_REPO_ROOT" -s "${_CODEX_SANDBOX_MODE:?}" {{CODEX_MODEL_CONFIG_FLAG}} {{CODEX_WEB_SEARCH_FLAG}} --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR" | tee "$TMPRESP.events" | PYTHONUNBUFFERED=1 "$PYTHON_CMD" -u -c "
import sys, json
turn_completed_count = 0
turn_failed = False
+2 -2
View File
@@ -114,9 +114,9 @@ fi
_LABEL=consult${_SID:+-resume}
# Fix 1: wrap with timeout (gtimeout/timeout fallback chain via probe helper)
if [ -n "$_SID" ]; then
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort medium 540 codex exec resume "$_SID" - -c "sandbox_mode=\"${_CODEX_SANDBOX_MODE:?}\"" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR"
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort medium --request-effort '<effort-level>' 540 codex exec resume "$_SID" - -c "sandbox_mode=\"${_CODEX_SANDBOX_MODE:?}\"" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR"
else
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort medium 540 codex exec - -C "$_REPO_ROOT" -s "${_CODEX_SANDBOX_MODE:?}" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR"
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort medium --request-effort '<effort-level>' 540 codex exec - -C "$_REPO_ROOT" -s "${_CODEX_SANDBOX_MODE:?}" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR"
fi | tee "$TMPRESP.events" | PYTHONUNBUFFERED=1 "$PYTHON_CMD" -u -c "
import sys, json
turn_completed_count = 0
+2 -2
View File
@@ -100,9 +100,9 @@ fi
_LABEL=consult${_SID:+-resume}
# Fix 1: wrap with timeout (gtimeout/timeout fallback chain via probe helper)
if [ -n "$_SID" ]; then
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort medium 540 codex exec resume "$_SID" - -c "sandbox_mode=\"${_CODEX_SANDBOX_MODE:?}\"" {{CODEX_MODEL_CONFIG_FLAG}} {{CODEX_WEB_SEARCH_FLAG}} --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR"
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort medium --request-effort '<effort-level>' 540 codex exec resume "$_SID" - -c "sandbox_mode=\"${_CODEX_SANDBOX_MODE:?}\"" {{CODEX_MODEL_CONFIG_FLAG}} {{CODEX_WEB_SEARCH_FLAG}} --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR"
else
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort medium 540 codex exec - -C "$_REPO_ROOT" -s "${_CODEX_SANDBOX_MODE:?}" {{CODEX_MODEL_CONFIG_FLAG}} {{CODEX_WEB_SEARCH_FLAG}} --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR"
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort medium --request-effort '<effort-level>' 540 codex exec - -C "$_REPO_ROOT" -s "${_CODEX_SANDBOX_MODE:?}" {{CODEX_MODEL_CONFIG_FLAG}} {{CODEX_WEB_SEARCH_FLAG}} --json -o "$TMPRESP" < "$PROMPT_FILE" 2>"$TMPERR"
fi | tee "$TMPRESP.events" | PYTHONUNBUFFERED=1 "$PYTHON_CMD" -u -c "
import sys, json
turn_completed_count = 0
+2 -2
View File
@@ -56,7 +56,7 @@ _CODEX_SANDBOX_MODE=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SANDBOX: //p')
# The 330s wrapper sits BELOW the 360s Bash gate so the wrapper fires FIRST
# and a stall surfaces as a diagnosable exit 124 with an explicit message,
# never as a silent harness kill that downstream reads as "no findings".
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high 330 codex review --base <base> -c "sandbox_mode=\"${_CODEX_SANDBOX_MODE:?}\"" -c "review_model=\"${_CODEX_SEL:?}\"" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' < /dev/null >"$TMPOUT" 2>"$TMPERR"
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high --request-effort '<effort-level>' 330 codex review --base <base> -c "sandbox_mode=\"${_CODEX_SANDBOX_MODE:?}\"" -c "review_model=\"${_CODEX_SEL:?}\"" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' < /dev/null >"$TMPOUT" 2>"$TMPERR"
_CODEX_EXIT=$?
cat "$TMPOUT"
if [ "$_CODEX_EXIT" = "124" ]; then
@@ -123,7 +123,7 @@ _PROMPT_FILE=$(mktemp "$TMP_ROOT/codex-prompt-XXXXXX") || { echo "ERROR: mktemp
git diff "<base>...HEAD" 2>/dev/null
printf '\nDIFF_END\n'
} > "$_PROMPT_FILE"
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high 330 codex exec - -s "${_CODEX_SANDBOX_MODE:?}" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' --json -o "$TMPOUT" < "$_PROMPT_FILE" >"$TMPOUT.events" 2>"$TMPERR"
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high --request-effort '<effort-level>' 330 codex exec - -s "${_CODEX_SANDBOX_MODE:?}" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' --json -o "$TMPOUT" < "$_PROMPT_FILE" >"$TMPOUT.events" 2>"$TMPERR"
_CODEX_EXIT=$?
rm -f "$_PROMPT_FILE" "$FOCUS_FILE"
cat "$TMPOUT"
+2 -2
View File
@@ -49,7 +49,7 @@ cd "$_REPO_ROOT"
# The 330s wrapper sits BELOW the 360s Bash gate so the wrapper fires FIRST
# and a stall surfaces as a diagnosable exit 124 with an explicit message,
# never as a silent harness kill that downstream reads as "no findings".
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high 330 codex review --base <base> -c "sandbox_mode=\"${_CODEX_SANDBOX_MODE:?}\"" {{CODEX_REVIEW_MODEL_CONFIG_FLAG}} {{CODEX_WEB_SEARCH_FLAG}} < /dev/null >"$TMPOUT" 2>"$TMPERR"
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high --request-effort '<effort-level>' 330 codex review --base <base> -c "sandbox_mode=\"${_CODEX_SANDBOX_MODE:?}\"" {{CODEX_REVIEW_MODEL_CONFIG_FLAG}} {{CODEX_WEB_SEARCH_FLAG}} < /dev/null >"$TMPOUT" 2>"$TMPERR"
_CODEX_EXIT=$?
cat "$TMPOUT"
if [ "$_CODEX_EXIT" = "124" ]; then
@@ -104,7 +104,7 @@ _PROMPT_FILE=$(mktemp "$TMP_ROOT/codex-prompt-XXXXXX") || { echo "ERROR: mktemp
git diff "<base>...HEAD" 2>/dev/null
printf '\nDIFF_END\n'
} > "$_PROMPT_FILE"
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high 330 codex exec - -s "${_CODEX_SANDBOX_MODE:?}" {{CODEX_MODEL_CONFIG_FLAG}} {{CODEX_WEB_SEARCH_FLAG}} --json -o "$TMPOUT" < "$_PROMPT_FILE" >"$TMPOUT.events" 2>"$TMPERR"
"$_CODEX_PROBE" run-with-timeout --user-invoked --effort high --request-effort '<effort-level>' 330 codex exec - -s "${_CODEX_SANDBOX_MODE:?}" {{CODEX_MODEL_CONFIG_FLAG}} {{CODEX_WEB_SEARCH_FLAG}} --json -o "$TMPOUT" < "$_PROMPT_FILE" >"$TMPOUT.events" 2>"$TMPERR"
_CODEX_EXIT=$?
rm -f "$_PROMPT_FILE" "$FOCUS_FILE"
cat "$TMPOUT"