[BUG]
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code is hitting a false-positive Output blocked by content filtering policy error during a refactor of my own ISRC matching algorithm.
Project context: I match Spotify tracks against MusicBrainz (open music encyclopedia) using ISRC — the ISO 3901 International Standard Recording Code, exposed on Spotify's /tracks/{id} endpoint as external_ids.isrc. When my pipeline finds discrepancies and my data looks more accurate, I propose corrections back to MusicBrainz. This is exactly the kind of work MusicBrainz exists for: improving open music metadata. There is no lyrics, no audio, no copyrighted text, no DRM circumvention — only public identifiers and metadata fields from two well-documented APIs.
What I was doing when it broke: I already have a working algorithm inside one class. I asked Claude Code to extract it into a reusable service so I can call it from multiple classes (matcher, importer, reconciler). The error fires specifically on the extraction/refactor step — the same logic working as a one-class implementation generates fine; asking Claude to restructure it into a reusable form is what trips the filter.
Steps to reproduce
- Open a Claude Code session in a Laravel project that already contains a class with ISRC matching logic against Spotify + MusicBrainz.
- Ask Claude to extract that logic into a reusable service class (e.g.
IsrcResolver/IsrcMatcher) so it can be called from multiple consumers. - Claude begins responding, then the request is rejected with the error above. Retrying and/or restarting the session reproduces it.
Environment
- Claude Code version: <fill in:
claude --version> - Operating System: <fill in>
- Terminal: <fill in>
- Platform: Anthropic API
- Stack: PHP 8.5 / Laravel
Troubleshooting already attempted
- Retried the same prompt — same error
- Started a fresh session (no resume) — same error
- Rephrased the prompt avoiding "optimal" / "version" / "song" wording — <fill in result>
- Asked for the refactor in smaller chunks (interface first, then implementation) — <fill in result>
Expected behavior
- Open a Claude Code session in a Laravel project that already contains a class with ISRC matching logic against Spotify + MusicBrainz.
- Ask Claude to extract that logic into a reusable service class (e.g.
IsrcResolver/IsrcMatcher) so it can be called from multiple consumers. - Claude begins responding, then the request is rejected with the error above. Retrying and/or restarting the session reproduces it.
Hypothesis
Two signals may be combining to produce this false positive:
- Refactoring necessarily produces a near-copy of input code. When I ask Claude to extract my existing algorithm, its output overlaps heavily with source code that's already in the repo / context. That's the literal definition of refactoring, but it can look like reproduction to a regurgitation classifier.
- Music + identifier vocabulary. "ISRC," "version of a song," "match Spotify track" may pattern-match to piracy/circumvention intent in isolation, even though the actual operation — cross-referencing public IDs against MusicBrainz — is the opposite of that.
It would be helpful if the classifier could distinguish refactoring of user-supplied code (where high overlap is expected and correct) from reproduction of external copyrighted material. The request ID above should let the team trace exactly which output was blocked.
What Should Happen?
Claude Code should help refactor my own working algorithm into a reusable service.
Error Messages/Logs
API Error: {"type":"error","error":{"details":null,"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":"req_011CagnbPwjtRnarWo2CLZj1"}
Steps to Reproduce
- Open a Claude Code session in a Laravel project that already contains a class with ISRC matching logic against Spotify + MusicBrainz.
- Ask Claude to extract that logic into a reusable service class (e.g.
IsrcResolver/IsrcMatcher) so it can be called from multiple consumers. - Claude begins responding, then the request is rejected with the error above. Retrying and/or restarting the session reproduces it.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.126 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗