Skip to content

bug: remote sessions stay trapped behind 502 until /fork on v1.22.0 #1556

Description

@labanmne

Existing-report check

I searched the existing reports. The underlying failure appears related to the confirmed stale hard-affinity bug in #1505 (Bug 2) and the still-unmerged fix in #1417. This report documents the currently shipped multi-machine behavior and missing practical recovery path on the latest stable release.

codex-lb version

1.22.0, confirmed from the live server's x-app-version response header.

Deployment method

Central codex-lb instance exposed to multiple machines on the same LAN at http://192.168.1.223:2455.

Client used against codex-lb

Codex CLI from multiple machines.

ChatGPT account plan(s) involved

Multi-account pool.

Model(s) involved

Codex Responses traffic through /backend-api/codex/responses.

What happened?

An existing Codex conversation on another machine becomes permanently unusable and repeatedly returns:

unexpected status 502 Bad Gateway: No available accounts,
url: http://192.168.1.223:2455/backend-api/codex/responses,
request id: 01efef95-804e-4d03-ae4a-a38120c3b6d5

Retries do not recover the conversation. The codex-lb process itself remains reachable and healthy:

GET /health -> 200 {"status":"ok"}
x-app-version: 1.22.0

Running /fork is the only practical client-side workaround. The fork succeeds because it creates a fresh session, while the original conversation remains trapped behind its stale/unavailable hard-affinity owner. That also demonstrates that "No available accounts" is misleading: capacity exists for a fresh session, but the existing session cannot use it.

This is especially bad with one central codex-lb instance serving several machines. A user on a remote client cannot reasonably be expected to inspect or purge server-side sticky-session state every time an owner account becomes unavailable.

What did you expect to happen?

Before downstream-visible output, codex-lb should recover safely when a hard-affinity owner is durably unavailable:

  • re-resolve the session onto another eligible account when continuity can safely be abandoned; or
  • expose an explicit, session-scoped recovery operation that the client can invoke without requiring a new conversation; and
  • return a precise continuity/affinity error instead of the false generic claim that there are no available accounts.

I am not asking codex-lb to cross accounts where upstream-owned state makes that unsafe. I am asking for a supported recovery path that is not "throw away or fork the conversation."

Steps to reproduce

  1. Run a central codex-lb 1.22.0 instance with a multi-account pool.
  2. Point Codex CLI installations on more than one machine at that LAN endpoint.
  3. Continue an existing conversation whose hard-affinity owner has become unavailable, exhausted, paused, deleted, or otherwise excluded from selection.
  4. Observe persistent 502 Bad Gateway: No available accounts across retries.
  5. Run /fork from the failing conversation.
  6. Observe that the fork works while the original conversation remains broken.

Relevant client error

unexpected status 502 Bad Gateway: No available accounts, url: http://192.168.1.223:2455/backend-api/codex/responses, request id: 01efef95-804e-4d03-ae4a-a38120c3b6d5

Server logs spanning this request can be supplied if needed.

Additional context

Bluntly: this project has become regression whack-a-mole. Every new release seems to break some new core workflow. A load balancer that strands existing conversations on other machines while a /fork immediately works is failing at its basic job. /fork is a conversation-management command, not an availability or repair mechanism.

#1417 is still open, currently conflicting, and its fix has not shipped in either stable 1.22.0 or 1.23.0-beta.2. Please prioritize shipping a stable recovery path rather than continuing to treat manual session purges or new conversations as acceptable operational workarounds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-infoWaiting on reporter for reproduction / details

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions