Repository navigation
Description
Summary
The Account Pooler does not register a route for Codex's standalone search endpoint, so Codex web search fails with a router-level 404 for every thread routed through the pool:
HTTP 404: plugin "account-pool" has no POST route for "/v1/alpha/search"
The agent then degrades to fetching pages directly, which hits JavaScript/cookie challenges, so the failure surfaces as "web search is broken" rather than as a routing gap.
Cause
packages/.../account-pool/src/server.ts contributes CODEX_OPENAI_BASE_URL as serverPath: "/api/v1/plugins/account-pool/http/v1". Current Codex clients send standalone search to ${base}/alpha/search, which arrives at the plugin as subPath /v1/alpha/search.
The plugin registers only:
POST /v1/messages(claude)POST /v1/messages/count_tokens(claude)POST /v1/responses(codex)GET /v1/models(codex)HEAD /api/hello
bb.http.route is exact-match, so the request stops in src/routes/plugins.ts and never reaches the hub.
Nothing else is missing. mountedUpstreamUrl(request, settings.codexUpstreamBaseUrl, "v1/") already forwards by path, so the request needs no translation — only a registration.
Verification (bb 0.42.1, Linux)
Before, through the pool:
POST {CODEX_OPENAI_BASE_URL}/alpha/search -> 404 {"ok":false,"error":"plugin \"account-pool\" has no POST route for \"/v1/alpha/search\""}
POST {ANTHROPIC_BASE_URL}/v1/messages/count_tokens -> 200 (control)
The upstream supports the endpoint. Direct to the configured Codex upstream with pool-style credentials:
POST https://chatgpt.com/backend-api/codex/alpha/search
{"id":"...","model":"gpt-5.6-sol","commands":{"search_query":[{"q":"..."}]}}
-> 200 {"encrypted_output":"gAAAAA..."}
Suggested fix
One registration alongside the existing Codex routes:
bb.http.route(
"POST",
"/v1/alpha/search",
(context) => hub.handle(context.req.raw, "codex"),
{ auth: "none" },
);I applied exactly this to the shipped bundle on my host and reloaded the plugin:
POST {CODEX_OPENAI_BASE_URL}/alpha/search -> 200 {"encrypted_output":"gAAAAA..."}
POST {ANTHROPIC_BASE_URL}/v1/messages/count_tokens -> 200 (no regression)
It slots into the existing pipeline unchanged: account selection, credential replacement, failover, quota accounting and logging all come from hub.handle. parseCodexRequestBody tolerates the search body shape (no thread-id/prompt_cache_key, so no affinity pin, family: "other").
Since account-pool is builtin, a local patch is reverted by the next bb-app update, hence this issue.
Note for triage
Claude Code's WebSearch is unaffected and needs no route: it rides /v1/messages with the server-side web_search_20250305 tool. This is Codex-specific.
A different proxy hit the identical gap and fixed it the same way, which may be useful for confirming the client contract: farion1231/cc-switch#5378 and its PR #5379.
Activity
bb-slop-cop commentedon Sep 11, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassified as Bug · Medium priority · Low effort; added
providersandprovider-codex.REPRODUCED · high root-cause confidence — reproduction report. Two clean checkouts of trusted main reproduced the missing Codex search registration. Exact route lookup rejects the request before the pool hub; the existing responses control reaches its authentication gate. The report includes the failing test. Live upstream search was not tested.
Reproduction label:
confirmed-repro.No PR: adding an externally callable HTTP endpoint exceeds this rule's simple-fix restriction against public-protocol changes.
Route Codex standalone search through the Account Pooler (get-bb#3541)