[Bug] WebSearch fails with 400 when effort is `xhigh` due to thinking disabled in sub-request

Status Fixed / completed
Reported on v2.1.220
Maintainer reply None cached
Activity 1 comment · opened Jul 27, 2026 · closed Jul 27, 2026

Bug Description
Title: WebSearch fails with 400 when effort is xhigh (server-side search sub-request has thinking disabled)

Version: 2.1.220 (native install)
Platform: macOS (Darwin 25.5.0)
Model: opus[1m]

What happens

With "effortLevel": "xhigh" in ~/.claude/settings.json, every WebSearch call fails immediately:

API Error: 400 output_config.effort 'xhigh' is not supported when thinking is disabled on this model. Use effort 'high' or below, or enable thinking.

The main conversation loop works fine at xhigh — only web search breaks. WebFetch is unaffected.

Repro

  1. Set in ~/.claude/settings.json:

"alwaysThinkingEnabled": true, "effortLevel": "xhigh"

  1. Start a session, ask Claude to search the web for anything.
  2. Every WebSearch returns the 400 above. /effort high fixes it immediately; /effort ultracode (which pins xhigh) reintroduces it.

Likely cause

WebSearch is the server-side web_search_20250305 tool, invoked via a separate sub-request (the bundle refers to this path as websearch-proxy). That sub-request appears to run with thinking disabled, but still inherits the session's output_config.effort. xhigh + disabled thinking is an illegal combination, so the API rejects it. The main loop has thinking enabled, which is why it isn't affected.

Expected

The search sub-request should either clamp effort to high when thinking is disabled, or omit output_config.effort entirely — it shouldn't be able to construct a request the API will reject.

There's already an existing guard for a neighboring case; strings in the bundle include effortUnsupportedModels and [effort] model … rejected output_config.effort; latching unsupported and retrying without it (telemetry tengu_effort_unsupported_retry). That retry latch doesn't appear to cover the thinking-disabled variant of the rejection, so the er instead of being retried.

Impact

Web search is completely unusable at xhigh, which also meantracode` session. The error message points at effort settingsbut gives no indication that lowering effort is the workaroun*, so it reads as a broken tool rather than a config conflict.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.220
  • Feedback ID: ddb83505-46e2-43be-93a8-280bfe5246c9

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"output_config.effort 'xhigh' is not supported when thinking is disabled on this model. Use effort 'high' or below, or enable thinking.\"},\"request_id\":\"req_011CdSbAUu2EfwRKjzBiUmLo\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:40:49836)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:80:7690)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-07-27T12:49:22.010Z"}]

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗