[BUG] Claude Code fails with a content filtering policy error when attempting to add a Mozilla license to a GitHub repository

Status Closed — not planned
Maintainer reply None cached
Activity 11 comments · opened Jul 23, 2025 · closed Jan 16, 2026

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.58 (Claude Code)
  • Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
  • Terminal: <!-- e.g. iTerm2, Terminal App -->

Bug Description

Claude Code fails with a content filtering policy error when attempting to add a Mozilla license to a GitHub repository. The request is blocked despite being a legitimate software licensing task.

Steps to Reproduce

  1. Open Claude Code in terminal
  2. Navigate to a GitHub repository directory
  3. Execute the command: "Add Mozilla license to my github repo"
  4. Observe the API error response

Expected Behavior

Claude Code should successfully add the Mozilla Public License file to the repository, creating an appropriate LICENSE file with the correct license text.

Actual Behavior

The request fails with the following error:

``API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering policy"}}``

Additional Context

This appears to be a false positive in the content filtering system, as adding open source licenses to repositories is a standard and legitimate software development practice. The Mozilla Public License is a widely-used, OSI-approved open source license.

View original on GitHub ↗

11 Comments

Custos · 1 year ago

Does this with code of conduct as well - this was the first request of the chat

 can you create an appropriate github code of conduct after evaluating @CONTRIBUTING.md @LICENSE
  ⎿  Read CONTRIBUTING.md (155 lines)
  ⎿  Read LICENSE (93 lines)

⏺ I'll create a Code of Conduct that aligns with your project's collaborative spirit and the Elastic
  License 2.0. Based on your CONTRIBUTING.md file, I can see it references a Code of Conduct that doesn't
   exist yet.
  ⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by 
     content filtering policy"}}

 /bug this should not be hitting content filtering
  ⎿  Bug report submitted
github-actions[bot] · 1 year ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/4379
  2. https://github.com/anthropics/claude-code/issues/2111
  3. https://github.com/anthropics/claude-code/issues/5669

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

furic · 1 year ago

Same here, I simply need to proceed a cities csv from GeoNames, into a json with the data I want. I thought it was the file too large for Claude so I spent a little while splitting it but still doesn't work, until I found this issue.
The data is free for use and there's no copyright issue.

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

rweijnen · 8 months ago

Maybe actually fixing issues would be better than ignoring until auto closed

vanrez-nez · 8 months ago

Having the same issue! whats going on? /clear or restarting does not solve this issue

github-actions[bot] · 7 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

rweijnen · 7 months ago

well done, ignored it long enough to be able to auto-close

marcindulak · 7 months ago

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

momomo · 7 months ago

I have the same issue. I can reproduce it as many times as I want. I think it has to do with me asking it to refactor a java class that uses Java Robot API, and thus it basically refuses to refactor it. The problem is this hurts ability to rely on Claude for all kinds of refactorings and code cleanups.

It begun refactoring it, but then refused. Initially I was invoking the command via bash scripting feeding it and it kept failing, until I rat it from claude cli myself and it failed.

``Error: CLI error (exit 1): stdout: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":"req_011CXN5SXcbgyqQ3rLpwrb3c"}``

I was sending it a prompt and files to touch:

```Files to process:
-.path/to/NettyQueryParser.java

  • path/to/NettyServerAction.java
  • path/to/NettyServerBase.java
  • path/to/ScreenClicker.java


When I removed the last class it proceeds. I dpn't have the full message, but the local claude seems to have started to refactor the last one but then refused to apply it and just existed. 

One could have hoped that at least the error message would have been clearer. 

Claude itself said this: 

Diagnosed API content filtering issue from processed files

That error is coming from Anthropic's API content filtering, not from your script. The API blocked the output (Claude's response) because something in it triggered content filters.

Common causes:

The files you're processing contain content that, when refactored or discussed, triggers filters (security code, exploit examples, sensitive keywords, etc.)
The prompt + file combination produces a response the filters don't like
False positive - sometimes benign code trips filters unexpectedly

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.