From 386cae90ea63327ec7a2451f2c80b859271c2483 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 3 Oct 2026 21:44:56 +0000 Subject: [PATCH] codex consult: drop issue numbers from runtime prose; archaeology allowlist has no pending entries --- codex/sections/consult-mode.md.tmpl | 12 ++++++------ test/archaeology-lint.test.ts | 24 ------------------------ 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/codex/sections/consult-mode.md.tmpl b/codex/sections/consult-mode.md.tmpl index 4f1f4e1df..9c6112c31 100644 --- a/codex/sections/consult-mode.md.tmpl +++ b/codex/sections/consult-mode.md.tmpl @@ -113,7 +113,7 @@ for line in sys.stdin: err = obj.get('error',{}).get('message','') or 'no error message in event' print(f'[codex turn FAILED] {err}', flush=True, file=sys.stderr) except: pass -# Three-way completeness check (#2671; consult previously had NONE): a STATED +# Three-way completeness check: a STATED # failure is a failure, not a network problem; only silence is a disconnect. if turn_failed: print('[codex] turn.failed received — the turn errored (reason above), not a disconnect.', flush=True, file=sys.stderr) @@ -121,21 +121,21 @@ elif turn_completed_count == 0: print('[codex warning] No turn.completed event received — possible mid-stream disconnect.', flush=True, file=sys.stderr) " # Fix 1: hang detection for Consult new-session (mirrors Challenge + resume) -_CODEX_EXIT=${PIPESTATUS[0]:-${pipestatus[1]}} # bash sets PIPESTATUS; zsh (lowercase, 1-indexed) falls through (#2669) +_CODEX_EXIT=${PIPESTATUS[0]:-${pipestatus[1]}} # bash sets PIPESTATUS; zsh (lowercase, 1-indexed) falls through if [ "$_CODEX_EXIT" = "124" ]; then _gstack_codex_log_event "codex_timeout" "540" _gstack_codex_log_hang "consult" "$(wc -c < "$TMPERR" 2>/dev/null || echo 0)" echo "Codex stalled past 9 minutes. Common causes: model API stall, long prompt, network issue. Try re-running. If persistent, split the prompt or check ~/.codex/logs/." elif [ "$_CODEX_EXIT" != "0" ]; then # Surface non-zero exits so the calling agent doesn't read "no output" as - # a silent model/API stall. See #1327. + # a silent model/API stall. echo "[codex exit $_CODEX_EXIT] $(head -1 "$TMPERR" 2>/dev/null || echo "no stderr captured")" head -20 "$TMPERR" 2>/dev/null | sed 's/^/ /' || true _gstack_codex_log_event "codex_nonzero_exit" "consult:$_CODEX_EXIT" fi ``` -**Session-cost reality (#2387, measured):** every `codex exec` call — resumed +**Session-cost reality (measured):** every `codex exec` call — resumed or fresh — pays Codex's ~21K-token session prelude (its skill catalogue + instructions); `resume` does NOT amortize it (a measured resume came in slightly ABOVE a fresh call). Resume buys conversational continuity, never @@ -159,14 +159,14 @@ _gstack_codex_timeout_wrapper 540 codex exec resume "" -c ' " # Fix 1: same hang detection pattern as new-session block -_CODEX_EXIT=${PIPESTATUS[0]:-${pipestatus[1]}} # bash sets PIPESTATUS; zsh (lowercase, 1-indexed) falls through (#2669) +_CODEX_EXIT=${PIPESTATUS[0]:-${pipestatus[1]}} # bash sets PIPESTATUS; zsh (lowercase, 1-indexed) falls through if [ "$_CODEX_EXIT" = "124" ]; then _gstack_codex_log_event "codex_timeout" "540" _gstack_codex_log_hang "consult-resume" "$(wc -c < "$TMPERR" 2>/dev/null || echo 0)" echo "Codex stalled past 9 minutes. Common causes: model API stall, long prompt, network issue. Try re-running. If persistent, split the prompt or check ~/.codex/logs/." elif [ "$_CODEX_EXIT" != "0" ]; then # Surface non-zero exits so the calling agent doesn't read "no output" as - # a silent model/API stall. See #1327. + # a silent model/API stall. echo "[codex exit $_CODEX_EXIT] $(head -1 "$TMPERR" 2>/dev/null || echo "no stderr captured")" head -20 "$TMPERR" 2>/dev/null | sed 's/^/ /' || true _gstack_codex_log_event "codex_nonzero_exit" "consult-resume:$_CODEX_EXIT" diff --git a/test/archaeology-lint.test.ts b/test/archaeology-lint.test.ts index 5bef9c3f9..f52e5930c 100644 --- a/test/archaeology-lint.test.ts +++ b/test/archaeology-lint.test.ts @@ -29,30 +29,6 @@ const ALLOWLIST: AllowEntry[] = [ { skills: ['landing-report'], anchor: 'feat/payments', reason: 'sample landing-report output (PR number of a sibling workspace)' }, { skills: ['retro'], anchor: 'Biggest ship: PR #605', reason: 'sample retro output' }, { skills: ['codex'], anchor: 'OpenAI issues #8545', reason: 'upstream OpenAI Codex issue IDs behind the reasoning-effort default' }, - { - skills: ['codex'], - anchor: 'consult previously had NONE', - source: 'codex/sections/consult-mode.md.tmpl', - reason: 'PENDING: codex/sections/consult-mode.md.tmpl is a W1 rule file; drop "(#2671; consult previously had NONE)" there and delete this entry', - }, - { - skills: ['codex'], - anchor: 'falls through (#2669)', - source: 'codex/sections/consult-mode.md.tmpl', - reason: 'PENDING: codex/sections/consult-mode.md.tmpl is a W1 rule file; drop " (#2669)" there and delete this entry', - }, - { - skills: ['codex'], - anchor: 'stall. See #1327.', - source: 'codex/sections/consult-mode.md.tmpl', - reason: 'PENDING: codex/sections/consult-mode.md.tmpl is a W1 rule file; drop " See #1327." there and delete this entry', - }, - { - skills: ['codex'], - anchor: 'Session-cost reality (#2387, measured)', - source: 'codex/sections/consult-mode.md.tmpl', - reason: 'PENDING: codex/sections/consult-mode.md.tmpl is a W1 rule file; use "(measured)" there and delete this entry', - }, ]; /** `#` + 3 or more digits (bare or parenthesized), `PR #N`, `issue #N`, incident stories. */