codex consult: drop issue numbers from runtime prose; archaeology allowlist has no pending entries

This commit is contained in:
garrytan committed 2026-10-03 21:44:56 +00:00
1 parent 363de42c74
commit 386cae90ea
2 files changed
+6 -30

No files matched your search

+6 -6
View File
@@ -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 <session-id> "<prompt>" -c '
<same python streaming parser as above, with flush=True on all print() calls>
"
# 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"
-24
View File
@@ -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. */