[FEATURE] Add environment variable to bypass proxy detection for MCPSearch and tool_reference blocks

Resolved 💬 1 comment Opened Mar 7, 2026 by PancakeZik Closed Mar 10, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

In Claude Code version 2.1.70, a patch disabled "tool_reference" blocks when a custom "ANTHROPIC_BASE_URL" is detected. This prevents API 400 errors for standard proxies that reject the beta schema.
By stripping the "tool_reference" capability, the application disables deferred tool loading ("MCPSearch"). This forces all configured MCP tools directly into the main context window. For users running custom endpoints that correctly handle the "tool_reference" schema, this creates unnecessary context bloat and increases costs. It forces users who rely on deferred loading to remain on version 2.1.69.

Proposed Solution

Add an opt-in environment variable (for example, "CLAUDE_CODE_FORCE_TOOL_REFERENCE=true" or "CLAUDE_CODE_BYPASS_PROXY_CHECK=true") to override the proxy detection introduced in 2.1.70. This flag would allow advanced users to re-enable "MCPSearch" and deferred tool loading when using compatible third-party gateways.

Alternative Solutions

_No response_

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

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