Skip to content

Keep pooled affinity through the extended cache interval - #5265

Open
bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-5262
Open

bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-5262

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

The Account Pooler enables the one-hour Claude prompt-cache setting for subscription routing but expires live and persisted session-account affinity after 30 idle minutes. When another conversation advances the pool cursor, a recovered account's original session can resume on a different account during the cache interval, including after a plugin reload. Verified reproduction and root-cause report.

What changed

Extend the existing idle affinity TTL to 65 minutes: one hour plus a five-minute margin. Add routing regressions at 45 and 61 idle minutes, with and without a full plugin reload. Advance existing Claude/Codex and parent-affinity expiry checks to the new retention window. Eligibility, account failover, cursor behavior, and affinity capacity remain unchanged. No dependency, schema, stored-data, generated-file, public API, protocol, CLI, or release change.

Changed-line count: 79 total text lines (74 additions + 5 deletions) across 2 files in the Account Pooler subsystem.

How you verified

  • The test-only regression patch fails on trusted origin/main commit d474d2932dea14b5ccdfa305760c547c03a4d251: all four cases expect the first account but receive the second. The same agent repeated this failure in a second clean checkout with fresh fixture storage.
  • pnpm exec turbo run test --filter=bb-plugin-account-pool -- --testNamePattern='retains Claude session affinity': four cases pass after the fix.
  • pnpm exec turbo run test typecheck lint --filter=bb-plugin-account-pool: all 353 tests pass; typecheck and lint succeed. Two existing lint warnings also occur on unchanged production code.
  • Frozen installs and full Turbo builds succeed in both trusted checkouts. git diff --check and formatting checks pass; the diff contains no binary files.
  • The reproduction observes real plugin routing with a synthetic upstream. No live provider cache writes or billing were measured.

Fixes #5262

AGENT GENERATED

This branch has not been deployed

No deployments
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.

Account Pooler: 30-minute session pin is shorter than the 1-hour prompt cache

1 participant