Repository navigation
Description
Client or integration
Codex CLI
Area
Authentication and account pool
Summary
A request-owned Codex bearer gets no Pool affinity key. One conversation therefore changes Pool
account on about a third of its consecutive turns, and the request log labels every Pool selection
new_bind with reason healthy, so no binding is ever reused.
This repeats #6998 with fresh measurements after that report was closed by the issue-quality bot for
not using this form. The source path below is unchanged.
Two outcomes would make the behaviour readable and usable: an opt-in that lets a request-owned main
request keep one Pool binding per conversation, or a clear refusal that says such a request cannot
hold a binding instead of a row that reports new_bind with reason healthy every time. We do not
propose a patch; the decision on the ownership invariant is the maintainer's.
Reproduction
- Run OCX 2.94.0 with a Codex account pool of at least two Pool accounts.
- Send Codex CLI traffic with ChatGPT sign-in, so the client presents its own bearer.
- Read the last six hours of
~/.opencodex/usage.jsonl. - Tally the affinity fields on Pool rows and the account label on consecutive rows of one
conversation.
Measured on 2026-10-31 from 04:46 KST:
- Pool rows in the window: 843 of 1687 GPT rows.
- Affinity field on those rows:
affinity=new_bind843,reused0. - Affinity reason:
healthy843. - Main rows carry no affinity field: 844.
- Consecutive same-conversation pairs: 1589, account moves 564, rate 0.355.
- One-hour window at 05:05 KST: 560 pairs, 182 moves, rate 0.325.
The two labels alternate almost exactly (main 844, pool 843), which matches a per-request pick that
never reuses a binding.
Source on 2.94.0:
src/codex/auth-context.ts:1316-1318:affinityKeyis undefined whenpoolStateEligible()is
false, and it is false for a request-owned main credential (src/codex/auth-context.ts:203-208,
return fixedAccountId === undefined && !requestScopedMainCredential;).src/codex/routing/selection.ts:495: the binding is written only whencommitAffinity && threadId.src/server/responses/core-auth.ts:174-190: the ownership flags are derived here.src/codex/routing/thread-affinity.ts:130: the release path labels the decision
{ move: "new_bind", reason: "healthy" }even when no binding was stored.
The same gate is still present on the current source at v2.96.0: src/codex/auth-context.ts:1313
gates affinityKey on poolStateEligible, src/codex/routing/selection.ts:491 binds only when
commitAffinity && threadId, and src/codex/routing/thread-affinity.ts:130 still emits
new_bind/healthy (source read 2026-11-02).
One caveat measured on the same 2.94.0 install on 2026-11-02 01:25 KST: a six-hour window whose
traffic was served from stored Pool credentials shows 981 of 1160 Pool rows reused and a change
rate of 0.131. So the failure appears on the caller-bearer path, not on every request; the window
above is the caller-bearer one.
Version
2.94.0 (@bitkyc08/opencodex, npm global install; the proxy /healthz reports 2.94.0)
Operating system
macOS 26.5.2, arm64
Provider and model
openai / gpt-6.1-terra (Codex native family)
Logs or error output
affinity=new_bind 843 rows
affinityReason=healthy 843 rows
affinity reused 0 rows
consecutive pairs 1589
account moves 564
change rate 0.355
Screenshots and supporting files
None.
Redacted configuration
{
"accountPoolStrategy": "round-robin",
"accountPoolStickyLimit": 1,
"poolAccounts": 2
}Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
github-actions commentedon Nov 1, 2026
Automated translation bookkeeping — detected language: English.
github-actions commentedon Nov 1, 2026
Potential duplicates found:
Reason: The new issue explicitly states it is a re-report of 6998 with the same source path Pool affinity key for request-owned Codex bearer and identical failure signature newbind/healthy on every request, no reused binding.
Detected automatically via GitHub Copilot; automatic closure requires separate deterministic evidence.
fix(codex): honest affinity labels and opt-in request-owned conversat…
fix(codex): scope conversation-state issuers per bearer and fix revie…
test(codex): drive real preview callbacks; document issuer retention (#…
fix(codex): release a caller-owned main binding after its bearer is r…
fix(codex): fence caller-main releases to selection-time bindings (#8080
fix(codex): honest affinity labels and opt-in request-owned conversat…
lidge-jun commentedon Nov 2, 2026
Fixed on
devby #8096 (merge commitaffd8403a).new_bind/healthywhen no binding was stored. Rows now readunbound(reasonrequest_ownedorno_conversation) orcleared.codexPool.requestOwnedAffinity(default off) keeps one Pool binding per conversation for a caller's own ChatGPT bearer. The binding is scoped to that exact bearer, so one caller cannot reach another's.It will ship in the next release.