GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — codex-proxy: exec transports have no turn deadline — a hung codex exec child hangs the request forever and is never killed · Issue #2157 · developing-today/code

codex-proxy: exec transports have no turn deadline — a hung codex exec child hangs the request forever and is never killed #2157

New issue
Copy link
New issue
Copy link
Closed
#4108
Closed
codex-proxy: exec transports have no turn deadline — a hung codex exec child hangs the request forever and is never killed#2157
#4108
Copy link
Assignees
dezren39
Labels
app/codex-proxybin/codex-proxy.mjs fleet proxyeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

Problem

bin/codex-proxy.mjs's exec transports have no turn deadline. runCodexOnce (bin/codex-proxy.mjs:803, spawn at :815) returns a promise that settles only from the child's close handler (:921) or a synchronous spawn throw — there is no timer anywhere in the function. Both exec call sites await it directly: the warm-resume attempt (:1219) and the cold full-history run (:1242). If the spawned codex exec child hangs — alive but never finishing its turn (upstream stall, a CLI waiting on something, a wedged session resume) — the HTTP request hangs forever, the child process is never killed, and the promise never settles. The only recovery is the client giving up; even then nothing in runCodexOnce kills the child on client disconnect (no res.on('close') hook reaches it — onSpawn only registers the child for the caller's bookkeeping).

Every sibling path in the same file, and in the sibling proxies, is bounded:

  • The app-server transport in this same file: connect timeout 10s (:504), JSON-RPC timeout 30s (:635-641).
  • bin/claude-code-proxy.mjs: TURN_TIMEOUT_MS = 300 * 1000 (:55) applied to its spawned turns (:455-461), with a SIGKILL escalation 3s after the deadline (:480).
  • bin/muse-proxy.mjs's warm path: WARM_TURN_TIMEOUT_MS = 300 * 1000 (:300, applied :585-587).

The exec fallback is precisely the path taken when the bounded app-server path has already failed — i.e. when the backend is already misbehaving — and it is the one path with no bound at all.

Evidence (verified this run, main b2b885b9)

Sandbox probe with a fake codex binary ($HOME/.local/bin/codex under a scratch HOME; the fake answers debug models with garbage so the static catalog floor is used, and sleeps 60s for any other invocation), CODEX_PROXY_TRANSPORT=exec:

  • Proxy log: Spawning: .../codex exec --json --skip-git-repo-check ... -m gpt-5.6-luna ... — the request reached runCodexOnce's spawn.
  • curl -X POST /v1/chat/completions (non-streaming): no response after 8s (curl killed by timeout 8, exit 124, 0 response bytes) while the fake child (sleep 60) was still running. Nothing in the proxy would have ended the request before the child's own exit at 60s — and a truly hung child never exits.

Dedup: gh searches for codex-proxy exec timeout, runCodexOnce, and codex-proxy hang (open + closed) return no covering issue. Adjacent but distinct: #2097/#2100/#2102 are the same no-timeout class in design-code-proxy, clef-proxy, and antigravity-ls-proxy (HTTP fetch / RPC paths in other files); the muse-proxy exec path has the same defect and is filed separately this run.

Why it matters

code-queue workers and OpenCode sessions route real coding turns through this proxy. One hung codex exec child wedges its request indefinitely and leaks a process; repeated hangs accumulate children and stall every caller queued behind them, with no log line or error to act on. The fallback path exists for resilience — unbounded, it converts a backend stall into a permanent proxy-side hang.

Acceptance criteria

  • A codex exec turn that exceeds a named deadline (consistent with the house convention, e.g. claude-code-proxy's / muse-proxy's 300s turn timeout, or a CODEX_PROXY_* env override parsed strictly) is terminated (SIGTERM, then SIGKILL after a short grace) and the request settles with an error result through the existing done({ok:false, ...}) shape.
  • The deadline applies to both runCodexOnce call sites (warm resume and cold run); the app-server transport's existing timeouts are unchanged.
  • A client disconnect before the deadline also kills the exec child (no orphaned codex exec processes).
  • Regression tests in bin/codex-proxy.test.mjs style: a fake child that never exits is killed at the deadline and the request errors; a fake child that completes normally is unaffected.
  • No change to the success/failure semantics judged from turn.failed / exit code (codex-proxy: a failed codex run is reported as a successful 'stop' — close handler ignores exit code and signal in both modes #676/codex-proxy: a turn.failed event with exit 0 is reported as a successful 'stop' — #677 judged failure by exit code only, no terminal-event check #680 behavior preserved for children that do exit).

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1052

  3. dezren39
    added
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    effort/sSmall: expected under 2 hours of work
    app/codex-proxybin/codex-proxy.mjs fleet proxy
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-a (Lane A)
    • Session / ID: cron job new-issue-creator-code-a, run 2026-10-29T06:48Z
    • Found via: filed this run
    • Task: Filed after verifying with a fake hanging codex binary that the exec transports (runCodexOnce) have no turn deadline — request unsettled at 8s, child never killed — while the app-server path in the same file and both sibling proxies bound their turns.
    • Expectation: effort/s — triage pins the deadline value/source, then a small-fix adds deadline + disconnect kill with fake-child regression tests.
    • Links: packet queue-pilot/packet-2157-triage.json (repo-health-code-pilot)
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    Cross-link: the muse-proxy exec fallback path has the same no-deadline defect and is filed as #2159 (verified the same way this run). The two fixes can share the deadline convention pinned in triage.

  6. github-actions
    assigned
    dezren39
    on Oct 29, 2026
  7. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 1, 2026
  8. 63 remaining items

  9. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-h
    • Session / ID: task 8808
    • Found via: queue claim
    • Task: pr_shepherd for issue codex-proxy: exec transports have no turn deadline — a hung codex exec child hangs the request forever and is never killed #2157 — land the fix by rebasing PR fix(codex-proxy): bound exec turns and child cleanup #4108 (codex-proxy exec deadline) onto current main, dispositioning Codex findings, and merging. Execution assigned to the opencode lane; handed off to the laptop claimant (opencode-claimant).
    • Expectation: Claimant session rebases PR fix(codex-proxy): bound exec turns and child cleanup #4108, dispositions Codex, merges under the standing criteria, and drives task 8808 to a terminal state. Verified fresh: PR fix(codex-proxy): bound exec turns and child cleanup #4108 OPEN with no labels; issue codex-proxy: exec transports have no turn deadline — a hung codex exec child hangs the request forever and is never killed #2157 OPEN with no hard-stop labels.
    • Links: PR fix(codex-proxy): bound exec turns and child cleanup #4108; issue codex-proxy: exec transports have no turn deadline — a hung codex exec child hangs the request forever and is never killed #2157
  10. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 4, 2026
  11. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-j
    • Session / ID: task 8808; bound opencode session ses_e5e5c711f88ffe27qy6AhN4WGE
    • Found via: queue claim
    • Task: task 8808 for issue codex-proxy: exec transports have no turn deadline — a hung codex exec child hangs the request forever and is never killed #2157 handed off to the opencode execution lane; claimant drives the bound session
    • Expectation: s — land PR fix(codex-proxy): bound exec turns and child cleanup #4108 only when its ready condition is met: fresh check 2026-11-04 shows only CodeRabbit (skipping) on PR fix(codex-proxy): bound exec turns and child cleanup #4108 and no required CI — the PR-tier coverage gap is still open; Codex findings are already dispositioned and targeted tests passed (33) per the prior checkpoint
    • Links: issue codex-proxy: exec transports have no turn deadline — a hung codex exec child hangs the request forever and is never killed #2157, PR fix(codex-proxy): bound exec turns and child cleanup #4108
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    agent-note:v1
    task: 8808
    state: handed off
    event: handed_off
    lane: opencode
    execution_lane: opencode
    session_id: ses_e5e58cf03bbffeNSSiAFL9ZcVC
    note: OpenCode claimant launched and bound this worker session before sending the task packet.

  13. developing-today commented on Nov 4, 2026

    @developing-today
    developing-todayBot
    on Nov 4, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · handed off

    • Agent: OpenCode claimant (opencode-claimant)
    • Queue task: task 8808 (repo-health-code-pilot, worker repo-worker-code)
    • Issue: #2157
    • Session: ses_e5e58648c8bffeAkJejxNl5nwB
    • Route: opencode-route/workhorse; agent build
    • Expectation: this bound session works only task 8808, revalidates fresh state, heartbeats, and records a terminal queue state with this same session id.
  14. dezren39
    closed this as completedin #4108on Nov 4, 2026
  15. developing-today
    added
    status:done
    on Nov 4, 2026
  16. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 4, 2026
  17. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: repo-worker-code, opencode lane
    • Task: task 8808 — PR fix(codex-proxy): bound exec turns and child cleanup #4108 for issue codex-proxy: exec transports have no turn deadline — a hung codex exec child hangs the request forever and is never killed #2157
    • Result: PR fix(codex-proxy): bound exec turns and child cleanup #4108 merged; merge commit a335f212a844035b74a2d388ad99ff3c16bbf590 is current main. Issue codex-proxy: exec transports have no turn deadline — a hung codex exec child hangs the request forever and is never killed #2157 closed automatically.
    • Validation: CODEX_PROXY_TRANSPORT=exec-resume node --test bin/codex-proxy.test.mjs — 33 passed; both node --check commands passed; .github/scripts/check-proxy-port-fallbacks.sh passed on the merged tree.
    • CI note: No GitHub PR/merge-group checks ran. Fresh branch-protection/ruleset reads showed no required checks configured; the documented trigger-policy gap is already tracked by issue CI policy PR checks are missing workflow triggers #5149.
    • Session: ses_e5e58648c8bffeAkJejxNl5nwB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/codex-proxybin/codex-proxy.mjs fleet proxyeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.