Forumics logo Forumics
Issue 01

Back to issue

All Codex known issues

CLAIM C247 Supported 2026-12-06

GitHub issue #48500 in openai/codex, created 2026-09-26 by yzcj105 and titled "Managed app-server runs hooks with the first client's TMUX_PANE/TMUX, misattributing hook events to the wrong terminal pane (0.157 regression)", reports that since 0.157 the TUI talks to a shared `codex app-server --managed-daemon` (one per CODEX_HOME) and lifecycle hooks (UserPromptSubmit, Stop, PostToolUse) run inside that daemon, which inherits the environment of whichever TUI first spawned it, so every hook for every later TUI sees the first client's TMUX / TMUX_PANE; before 0.157 hooks ran in the TUI's own process and saw the correct pane. Reproduced on 0.157.1 on macOS with tmux: a UserPromptSubmit hook in pane B reports pane A together with B's session_id, and if pane A has since been closed while the daemon stays alive, B's hooks report a pane that no longer exists. Tmux-aware hook consumers (e.g. workmux status tracking) silently write B's session to A's pane or drop B's updates entirely. The author asks only that hooks are not handed a stale, arbitrary client's terminal identity, suggesting removing TMUX, TMUX_PANE (and similar terminal-identity variables) from the daemon's environment before running hooks, and optionally a hook-scoped, local-only payload field carrying the pid of the client that submitted the turn.

Verbatim Excerpts from Cited Records
“Since 0.157 the TUI talks to a shared `codex app-server --managed-daemon` (one per `CODEX_HOME`), and lifecycle hooks (`UserPromptSubmit`, `Stop`, `PostToolUse`) run inside that daemon.”
— yzcj105 · openai/codex (issue 48500 opening body, Summary section) · 2026-09-26T18:00:55Z ·GitHub Issue ↗
“The daemon inherits the environment of whichever TUI first spawned it, so every hook for every later TUI sees that first client's `TMUX` / `TMUX_PANE`.”
— yzcj105 · openai/codex (issue 48500 opening body, Summary section) · 2026-09-26T18:00:55Z ·GitHub Issue ↗
“**Actual:** B's hook reports **pane A** together with **B's** `session_id`.”
— yzcj105 · openai/codex (issue 48500 opening body, Reproduction section) · 2026-09-26T18:00:55Z ·GitHub Issue ↗
“Asking only that hooks are not handed a **stale, arbitrary** client's terminal identity.”
— yzcj105 · openai/codex (issue 48500 opening body, What this is / isn't asking for section) · 2026-09-26T18:00:55Z ·GitHub Issue ↗
Counter-record: Issue still open as of 2026-12-05. 23 comments read in total. Independent confirmations: ogulcancelik (2026-09-28, herdr, same misattribution with HERDR_PANE_ID on 0.157.1); bshor (2026-09-30, macOS/Herdr on 0.159.0, process-level env comparison); seiverlauth (2026-09-30, Herdr on 0.159.2, plus a successful --no-daemon control test); slaptijack (2026-10-07, stale TMUX_PANE %7 on 0.160.1, terminal-browser pane lookup failure); tomzhu0225 (2026-10-10, Linux/WSL on 0.162.1, Herdr restore across project folders); thewoolleyman (2026-11-02, Linux on 0.166.0, hook process parented to the daemon with the first client's HERDR_PANE_ID); hangs0908 (2026-10-30, 0.166.0, missing HERDR_ENV in tool calls). Maintainer etraut-openai (2026-09-28) responded that hooks run within the app server and have no relationship to attached clients, and that the pre-0.157 behaviour was never intended to be contractual; the author (2026-09-30) accepted the model and reframed the ask as a client-to- thread signal (#48880) plus stripping the stale vars. No fix merged, no duplicate, no withdrawal, no closure as of 2026-12-05; the latest comment (jokkopucko, 2026-12-05) reports a per-client displayed-thread signal working in a test integration (Ovis), not a Codex fix. Workaround in use: `codex --no-daemon` or `daemon_auto_start = false`. Falsification probe: If issue #48500 is closed as fixed, as a duplicate, or as not planned, or if the author edits the opening body so the quoted sentences no longer match verbatim, this claim drops to Withdrawn. Audit verification: Verified 100% continuous verbatim substring against official GitHub REST API by scripts/verify_claim_verbatim.py.