gstack/codex
Garry Tan bf7a31e427
fix(codex): surface non-zero exits so wrappers stop reading as silent stalls (#1467, #1327)
When codex exits non-zero (parse errors, arg-shape breaks, model API
errors that propagate as non-zero status), the calling agent
previously saw an empty output and burned 30-60 minutes misdiagnosing
as a silent model/API stall. The hang-detection block only caught
exit 124 (the timeout-wrapper signal).

Adds elif blocks in all four codex invocation sites (Review default,
Challenge, Consult new-session, Consult resume) that:
- Echo "[codex exit N] <stderr first line>" to stdout
- Indent the first 20 stderr lines for inline context
- Log codex_nonzero_exit telemetry tagged with the call site

Contributed by @genisis0x via #1467. Closes #1327.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 21:19:35 -07:00
..
SKILL.md fix(codex): surface non-zero exits so wrappers stop reading as silent stalls (#1467, #1327) 2026-05-18 21:19:35 -07:00
SKILL.md.tmpl fix(codex): surface non-zero exits so wrappers stop reading as silent stalls (#1467, #1327) 2026-05-18 21:19:35 -07:00