[BUG] Claude Code fails with a content filtering policy error when attempting to add a Mozilla license to a GitHub repository
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
- Open Claude Code in terminal
- Navigate to a GitHub repository directory
- Execute the command: "Add Mozilla license to my github repo"
- 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.
11 Comments
Does this with code of conduct as well - this was the first request of the chat
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
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.
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.
Maybe actually fixing issues would be better than ignoring until auto closed
Having the same issue! whats going on?
/clearor restarting does not solve this issueThis 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.
well done, ignored it long enough to be able to auto-close
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.
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
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
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.