[BUG] Output blocked by content filtering policy
Resolved 💬 21 comments Opened Jun 15, 2025 by amarkulo Closed Feb 28, 2026
Using Claude Code 1.0.24 I'm trying to implement GeolocationService in Laravel that would convert IP to location of the client that is accessing the service, but CC is not able to do the task.
Here are some outputs
✻ Thinking…
Now I need to create the GeolocationService for IP to location conversion. This service should:
1. Convert IP addresses to geographic locations (country, city)
2. Handle both IPv4 and IPv6 addresses
3. Use a local database or external API
4. Cache results for performance
5. Handle privacy considerations
6. Provide fallback mechanisms
For the geolocation service, I have a few options:
1. Use a free service like ip-api.com or ipinfo.io
2. Use a local database like GeoLite2
3. Use a Laravel package
I'll implement a service that can use multiple providers with fallbacks and caching.
Retry didn't helped either.
✻ Thinking…
I'll create a GeolocationService that:
1. Supports multiple providers (ip-api.com, ipinfo.io, etc.)
2. Has caching for performance
3. Includes rate limiting protection
4. Handles both IPv4 and IPv6
5. Provides fallback mechanisms
6. Respects privacy settings
7. Has local fallbacks for common ranges
Let me implement this service.
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering
policy"}}
> please continue with the GeolocationService
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering
policy"}}
21 Comments
I'm basically trying the same, just it should be list of countries. I think that because there is Russia, might be a problem ? Or any other problematic country.
Got same issue. I asked claude to write spam detector and had Russia keyword. How can you be loving so much Russia @claude?
just ran into this as well, trying to generate a country code to country name list...
I ran in to this error with this prompt:
Same issue, was trying to generate some random test data, with 2 digit ISO 3166-1 alpha-2 codes and associated full names.
Same issue just asked for a US state form API error.
the API is blocking the creation of the full US states list. Fixed: updating the form in chunks
instead of full states at once.
Also getting similar errors, trying to sort a 2 letter country code list alphabetically produced a content filtering issue
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.
I'm getting the same issues with Portuguese city names. That data is freely available and there's no copyright issue.
This is getting ridiculous now. Mobile dev MCP taking screenshots of the app somehow is activating content policy filtering?
<img width="1492" height="776" alt="Image" src="https://github.com/user-attachments/assets/20f59f93-c3b9-44ab-82f2-5f7b999e71e9" />
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.
I have a similar problem. I have, using Go, a country package with a map with all country names. Now I try to move that package to a shared repository and update all references/ add some other functions but Claude refuses with
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":null}. Strange thing is, the list of countries was earlier generated by Claude itself.I am using Claude Code version 2.0.76 (Claude Code)
I get the same error when I was refactoring our flag react component. It seems it's related to country names or something like that.
I get the same error. I needed a map of ISO 3166-1 alpha-2 to country name.
Was able to work around it by asking Claude Code to add 5 countries to the file and repeat till it runs out of countries. Suddenly it's not an issue anymore for the content filter. 🤦
And on one client I am also getting the same error but on another client (another VM) it appears to be working fine, this is on another repo so it might be the project but I got it on just trying to have claude add a bit more Lorem ipsum to a Hugo web site content
Ok I just tried two different things, 1) in a different repo on a different server and I did NOT get the error (400) and on the SAME server (well my desktop) in a different repo (this one a web server deployment script repo) again NO problems.
I by habit use claude --resume (I have an aliases for that) and just running claude appears to have fixed the problem
Imagine being russian and code this list of contries and asking claude to do the fixews there and got this. I just did and i got the same result, looks like not only politicians are idiots.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.