[BUG] <meta> tag in CLAUDE.md file causes 403 Forbidden error when using LiteLLM proxy

Resolved 💬 2 comments Opened Jul 7, 2025 by eamonmason Closed Aug 22, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [X] Other: LiteLLM using Anthropic proxy to claude-sonnet-4-20250514
  • Claude CLI version: 1.0.35 and 1.0.43
  • Operating System: macOS 15.5 (24F74)
  • Terminal: iTerm2 (3.5.13)

Bug Description

When the CLAUDE.md file contains a &lt;meta&gt; tag (either in a code block or as plain text), the Claude CLI returns a 403 Forbidden error when processing any prompt through a LiteLLM proxy configured with Anthropic. This issue is specific to the <meta> tag - other HTML tags work without problems, and using the word "meta" without angle brackets also works correctly.

The error occurs consistently across different Claude CLI versions (1.0.35 and 1.0.43) when using LiteLLM as a proxy to claude-sonnet-4-20250514. The issue appears to be related to how the <meta> tag is being processed or filtered, possibly during request preparation, resulting in the request being blocked with a 403 status code.

Steps to Reproduce

  1. Set environment variables:

``
ANTHROPIC_AUTH_TOKEN=xxx
ANTHROPIC_BASE_URL=https://litellm.int.xxxx.com
ANTHROPIC_MODEL=anthropic/claude-sonnet-4-20250514
ANTHROPIC_SMALL_FAST_MODEL=anthropic/claude-3-5-haiku-latest
``

  1. <code>mkdir test && cd $_ && echo "&#96;&lt;meta&gt;&#96;" > CLAUDE.md</code>
  2. claude
  3. Enter prompt "create docs" or any valid prompt

Expected Behavior

Processing of the prompt by claude and a response to the prompt

Actual Behavior

Response:

API Error: 403 <html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
</body>
</html>

Additional Context

Note this only occured for me with the meta tag, whether in a code block or not. Other HTML tags that I have used in the CLAUDE.md file, have not caused this error.

Using the meta word with surrounding <> does not cause the issue, which has been my workaround.

  1. <code>echo "&#96;meta&#96; tag" > CLAUDE.md</code>
  2. claude
  3. Enter prompt "create docs" or any valid prompt
  4. Response is valid

I created a simple docker container and tried it on two different machines (work and non-work) - the first via LiteLLM, where I see the same problem, and the second using Anthropic directly, where I did not observe the problem.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗