Skip to content

fix(account-pool): preserve provider session affinity - #3117

Merged
SawyerHood merged 13 commits into
get-bb:mainfrom
smsunarto:scott/pool-session-affinity
Sep 5, 2026
Merged

fix(account-pool): preserve provider session affinity#3117
SawyerHood merged 13 commits into
get-bb:mainfrom
smsunarto:scott/pool-session-affinity

Conversation

@smsunarto

@smsunarto smsunarto commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

Conversations could switch accounts under load even while their current account was healthy. Losing a warm prompt cache can increase uncached input and latency. Child sessions also missed their parent’s account affinity, and Codex session headers were dropped.

What changed

Keep conversations on eligible accounts and let children inherit an eligible parent’s account. A child can fail over independently. Preserve native session headers, cache keys, and encrypted payloads so routing does not unnecessarily disrupt cache reuse.

How you verified

Quota tests cover failover, staying on the replacement account, and recovery after all accounts exhaust. Both providers’ tests fail with affinity disabled. All 229 plugin tests, typecheck, lint, and formatting passed. Synthetic tests do not measure live cache improvement.

Fork branches are stacked; upstream PR diffs are cumulative.


This is part 4 of 4 in a stack made with GitButler:

AGENT GENERATED

@smsunarto
smsunarto force-pushed the scott/pool-session-affinity branch from 7973cf5 to 6e32ca8 Compare September 5, 2026 07:04
@SawyerHood
SawyerHood merged commit 4a5e755 into get-bb:main Sep 5, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants