Repository navigation
Conversation
fireblue
added a commit
to fireblue/codex-plugin-cc
that referenced
this pull request
May 17, 2026
…ai#303, openai#315) - Drop non-JSONL garbage on app-server stdout (openai#311) - Fix broker shutdown hang on unresponsive socket (openai#300) - Treat jobs as inactive when their PID is dead (openai#297) - Fix stale shared broker auth after account switch (openai#303) - Widen /codex:review wait threshold to ~5 files / 200 lines (openai#315) - Update test fixtures to include pid for PID-alive checks Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
audichuang
added a commit
to audichuang/codex-plugin-cc
that referenced
this pull request
Jun 7, 2026
…ision (1.0.9→1.0.12) Implements the verified reliability gaps from docs/reliability-backlog.md, TDD throughout, each batch adversarially verified by agent workflows. +56 tests (290 total, all green); `npm run build` clean (tsc); version sites in lockstep at 1.0.12; CHANGELOG documents every item. Batch 1 — most-defensive, smallest, pure-backend (1.0.9): - openai#2 robust stdout JSONL parsing: AppServerClientBase.handleLine strips ANSI and skips non-JSON noise instead of tearing down the connection (and killing the turn) on the first unparseable line. New lib/strings.mjs#stripAnsi. - openai#5 hook stdin tolerates EAGAIN/EWOULDBLOCK pipe jitter (new lib/hook-input.mjs; both hooks share it; returns {} instead of crashing and dropping session_id). - openai#1 captureTurn idle watchdog (CODEX_TURN_IDLE_TIMEOUT_MS, default 0/off because delta notifications are opted out; rejects with the thread/turn id). Batch 2 — process / connection lifecycle (1.0.10): - openai#3 terminateProcessTree POSIX descendant sweep (via ps) + ESRCH→direct-kill fallback; close() reaps the codex app-server subtree on every platform. Deliberately did NOT detach codex (would orphan its subtree on a watchdog broker-reap) — the tree-walk covers both the close and reap paths. - openai#262 broker reuse gated on the recorded pid being alive (isSessionStale), not just the endpoint answering. - openai#303 (stale broker after account switch) deferred — conflicts with the shared-broker safety rules and needs a fresh on-disk auth probe (account/read through the long-lived broker returns its own stale cached account). Batch 3 — output & failure visibility (1.0.11): - openai#4 adversarial-review prompt capped under the ~1 MB Codex input limit with UTF-8-safe truncation (truncateToByteBudget) + a truncation notice. - main() failures also emit a {"status":"error",...} envelope on stdout so the codex-rescue subagent (stdout-only) sees the failure. - non-retryable turn errors short-circuit to failed (authoritative willRetry=== false signal; narrow permanent-auth regex fallback), gated to the root thread so a subagent-thread error does not fail the parent. Batch 4 — UX / observability + the openai#355 design decision (1.0.12): - Background jobs survive SessionEnd: background:true marking, cleanupSessionJobs skips+retains them, and the shared broker is kept alive while any background job is active (shouldTeardownBroker + hasActiveBackgroundJobs). - /codex:attach: live log tail that exits at terminal status; bounded (maxConsecutiveNullStatus + finite maxPolls) and cross-workspace aware. - openai#6 cross-workspace job lookup: findJobByIdAcrossWorkspaces as a read-only fallback for an explicit id; default (no id) stays workspace/session-scoped. - dispatch sentinel [[codex-task status=dispatched id=...]]; and app-server type alignment (requestAttestation capability; drop removed experimentalRawEvents) for a clean tsc build. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: Detect when a shared Codex broker is serving stale account state after Codex login switches accounts; compare broker auth against a freshly started app-server and discard stale broker sessions; ignore dead broker endpoints when reporting session runtime status; add regression coverage for stale broker auth and current login tracking. Root cause: the plugin reuses a long-lived codex app-server broker inside Claude Code, and that process can keep serving the previous account after Codex login changes the local account. Testing: npm test; npm run build.