← reports

#7390 · Unsupported reasoning effort breaks Codex helper requests

BugPriority: MediumEffort: Lowprovidersprovider-codexIssue

November 10, 2026 · trusted origin/main 7c1353d80729983b86ea1555d18b42407f320406

Verdict: REPRODUCED at the real client / simulated HTTP service boundary. Root-cause confidence: high. No live workspace policy or production credentials were accessed.

1. TL;DR

Codex helper tasks construct every text request with reasoning effort none. A service that permits low but not none rejects that request before it can generate a title or commit message. A focused regression exercised the real authentication-file reader, request builder, HTTP client, and response/error handling with synthetic credentials and a transport stub that enforces that policy. Both configured helper models failed with HTTP 403 on unchanged production code, and the same test failed again in a second clean checkout. Changing the helper request to low makes both cases pass without changing authorization, error classifications, or model fallback policy.

2. Claims vs findings

ClaimFindingEvidence
Helper requests force an unsupported effort.Verified in source and executionThe request builder always emits none; a low-only service returns 403 for both configured helper models.
A 403 does not advance to the next helper model.Verified statically403 maps to request_failed, which is absent from the retry set. The root request fix avoids that error rather than expanding retries for unrelated permission failures.
The reporter's workspace rejects none and accepts low on the live endpoint.Not independently verifiedNo access to that workspace or its model catalog. The transport stub models this claimed restriction explicitly; it is not a live provider result.
Titles and commit messages share this helper path.Verified in sourceThe server dispatches both tasks through registered AI completion services; the Codex service passes both through the same client.
Cloud selection or disabling helper tasks works around the failure.Not exercisedNo production settings were changed.

3. Environment

4. Minimal reproduction

The only fake is the HTTP transport: it rejects an effort outside its allowed set and otherwise returns a valid text stream. Request construction and error handling remain production code. Save the following test-only patch as /tmp/7390-regression.patch.

diff --git a/plugins/provider-codex/src/ai/chatgpt-client.test.ts b/plugins/provider-codex/src/ai/chatgpt-client.test.ts
index e14164fd1b..7cc8b55aa8 100644
--- a/plugins/provider-codex/src/ai/chatgpt-client.test.ts
+++ b/plugins/provider-codex/src/ai/chatgpt-client.test.ts
@@ -9,6 +9,7 @@ import {
   transcribeCodexVoice,
 } from "./chatgpt-client.js";
 import { resetChatGptCloudflareCookiesForTests } from "./chatgpt-fetch.js";
+import { parseJsonValue, toJsonObject } from "./codex-auth.js";
 
 type FetchMock = ReturnType<typeof vi.fn<typeof fetch>>;
 
@@ -275,6 +276,44 @@ describe("Codex ChatGPT client", () => {
     expect(requestBody.text).toBeUndefined();
   });
 
+  it.each(["gpt-6-luna", "gpt-5.6-luna"])(
+    "completes with %s when the workspace only permits low reasoning",
+    async (model) => {
+      const homeDir = await makeTempHome();
+      await writeCodexAuth({
+        homeDir,
+        accessToken: createAccessToken({
+          accountId: "account-123",
+          expSeconds: Math.floor(Date.now() / 1000) + 3600,
+        }),
+        refreshToken: "refresh-token",
+        accountId: "account-123",
+      });
+      const fetchMock = setupFetchMock();
+      fetchMock.mockImplementation(async (_url, init) => {
+        const request = toJsonObject(parseJsonValue(textBodyFromInit(init)));
+        const reasoning = toJsonObject(request?.reasoning ?? null);
+        if (reasoning?.effort !== "low") {
+          return new Response(
+            JSON.stringify({ error: { message: "Unsupported reasoning effort" } }),
+            { status: 403 },
+          );
+        }
+        return sseResponse([
+          { type: "response.output_text.delta", delta: "Generated helper text" },
+        ]);
+      });
+
+      await expect(
+        completeCodexInference(
+          { model, prompt: "Return helper text", timeoutMs: 10000 },
+          new AbortController().signal,
+        ),
+      ).resolves.toBe("Generated helper text");
+      expect(fetchMock).toHaveBeenCalledTimes(1);
+    },
+  );
+
   it("runs plain-text inference with Codex API key auth from ~/.codex/auth.json", async () => {
     const homeDir = await makeTempHome();
     await writeCodexApiKeyAuth({

The patch extends the existing client test, reusing its synthetic authentication and cleanup helpers; no new dependency or production test seam is needed. Run:

git clone https://github.com/get-bb/bb.git bb-7390
cd bb-7390
git checkout --detach 7c1353d80729983b86ea1555d18b42407f320406
pnpm install --frozen-lockfile --prefer-offline
pnpm exec turbo run build --filter=@get-bb/plugin-sdk
pnpm exec turbo run build
git apply /tmp/7390-regression.patch
pnpm exec turbo run test --filter=bb-plugin-provider-codex -- src/ai/chatgpt-client.test.ts -t 'workspace only permits low reasoning'

Expected: both helper models return Generated helper text in one request. Actual on the base: process exit 1, both promises reject. Verbatim diagnostic lines:

AssertionError: promise rejected "AiServiceFailure: Codex inference request… { …(2) }" instead of resolving
Caused by: AiServiceFailure: Codex inference request failed with HTTP 403: Unsupported reasoning effort
Serialized Error: { code: 'request_failed', detailCode: 'codex_request_failed' }
Test Files  1 failed (1)
Tests  2 failed | 23 skipped (25)

5. Root cause

The request builder hardcodes the same effort regardless of the selected helper model:

reasoning: { effort: "none" }

completeCodexInference reads credentials, constructs that request, sends it, and throws for a non-OK response. HTTP error classification maps a normal 403 to request_failed. The two-model retry policy and completion loop only retry rate limiting, service unavailability, and invalid responses. Merely trying the second model would still send the same disallowed effort.

Title generation and commit-message generation use the shared AI-task dispatch. This explains why multiple helper surfaces can show the same failure, although neither UI surface was driven in this investigation.

The provider already uses a standard reasoning ladder beginning at low in its default model metadata. Catalog discovery belongs to the separate provider bridge; the helper HTTP client does not currently consume that catalog.

6. Proposed fix

Use low instead of none for these existing helper models, and update the local request type and existing payload assertions. This is the smallest repair for a service that allows low but forbids none. Keep generic 4xx behavior unchanged: broader permission retries and configurable or catalog-derived helper effort are separate policy/design work, not necessary to eliminate this invalid request.

This bounded repair does not claim to support an arbitrary workspace that also forbids low. Reasoning-enabled requests can have different latency and token usage; no live latency, billing, or 5-second helper deadline benchmark was performed.

7. Verification

Second clean reproduction by the same agent, not independent verification: cloned a second checkout at 7c1353d80729983b86ea1555d18b42407f320406, confirmed the production client remained unchanged, installed with the frozen lockfile, built the SDK and repository, applied only the test patch, and reran the exact focused Turbo command above. The second run again exited 1 with both cases failing for HTTP 403, request_failed; 23 unrelated cases were skipped. No correction to the root cause was needed.

In the first checkout, after the minimal request fix and formatting:

pnpm exec turbo run test --filter=bb-plugin-provider-codex -- src/ai/chatgpt-client.test.ts
Test Files  1 passed (1)
Tests  25 passed (25)

pnpm exec turbo run test lint typecheck --filter=bb-plugin-provider-codex
Test Files  46 passed (46)
Tests  571 passed (571)
Tasks: 10 successful, 10 total

git diff --check
(exit 0)

Change size: two existing files in one provider subsystem; 48 additions plus 4 deletions = 52 total changed text lines. No dependency, lockfile, generated artifact, migration, stored data, public protocol/schema, or authentication/authorization boundary changed.

8. Related issues and pull requests

No open pull request linked to #7390 was found in cross-reference metadata or an open-PR search before implementation. A related-issue search did not identify another issue about this helper request defect. Issue #6871 concerns ACP catalog identity and is not the same mechanism.

9. Appendix and limits

The first full build initially failed because the GitHub plugin required SDK dist subpaths that had not yet been built. Building @get-bb/plugin-sdk through Turbo first resolved that setup ordering failure; both full builds then completed with 73 successful tasks. No unrelated production fix was made.

Other checks: formatted only the two edited files with pnpm exec oxfmt; checked source history, current trusted main, repository visibility, labels, and linked-PR metadata. The full-build route-tree regeneration was discarded, not included in the patch. Raw logs and test artifacts remain local; the complete repeatable regression patch is embedded above so the public report needs no private downloads.

Trust boundary: issue content was treated only as untrusted claims. Suggested changes were not executed; the regression and repair were written from trusted source evidence. No issue-provided URL, command, script, branch, or external patch was fetched or run.