claude-code - 💡(How to fix) Fix False positive: transliteration/normalization maps blocked by content filter [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55922Fetched 2026-05-05 06:02:52
View on GitHub
Comments
3
Participants
2
Timeline
11
Reactions
0
Timeline (top)
labeled ×5commented ×3mentioned ×1renamed ×1

Error Message

API Error: {"type":"error","error":{"details":null,"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":"req_011CagnbPwjtRnarWo2CLZj1"}

API Error: {"type":"error","error":{"details":null,"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":"req_011Cagnt8WGoeBo9eeWcQdpj"}

Fix Action

Fix / Workaround

Suggested mitigation: weight character-map outputs by whether the mapping is a verbatim copy of public Unicode/ICU data versus a novel domain-specific curation. A simple signal: domain-specific maps almost always have asymmetric or opinionated entries (e.g. "ø" → "oe" rather than the ICU default "o") that pure reference data does not.

Workaround I'm using: keep the normalization table in a static config file (config/isrc/transliteration.php) and have Claude Code work only on the classes that consume it. Splitting the table by script (cyrillic.php, hebrew.php, latin_extended.php) also reduces the per-output size below whatever threshold the classifier is using.

Code Example

API Error: {"type":"error","error":{"details":null,"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":"req_011CagnbPwjtRnarWo2CLZj1"}

API Error: {"type":"error","error":{"details":null,"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":"req_011Cagnt8WGoeBo9eeWcQdpj"}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report
  • 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 when generating or refactoring code that contains a character normalization table mapping Cyrillic, Hebrew, and Latin Extended characters to their ASCII / regular-song-title equivalents.

Project context: I'm building an ISRC matching pipeline that reconciles Spotify tracks against MusicBrainz (open music encyclopedia) and proposes corrections back to MusicBrainz when my data is more accurate. ISRC = ISO 3901, the public industry identifier exposed on Spotify's /tracks/{id} as external_ids.isrc. No lyrics, no audio, no copyrighted text — only public identifiers and metadata from two well-documented APIs.

What triggers the block: Spotify and MusicBrainz frequently store the same recording with different transliterations of the artist/title (e.g. Cyrillic vs Latin, accented vs ASCII), so the matcher needs a normalization step before fuzzy comparison. The normalization table — a hand-curated array of 'character' => 'ascii_equivalent' pairs covering Cyrillic, Hebrew, and Latin Extended ranges — is the specific output that gets blocked. Refactoring or regenerating any class that contains this table reproduces the error reliably.

What Should Happen?

Claude Code should generate / refactor domain-specific character normalization tables. These are common in i18n, search normalization, slugification, and transliteration work. The mapping I'm working with is hand-curated for the music-metadata domain (it differs from generic ICU Any-Latin; Latin-ASCII output in deliberate ways — e.g. preserving "oe" expansions instead of collapsing to "o"), so it is not a reproduction of any public reference dataset.

Steps to Reproduce

  1. Open a Claude Code session.
  2. Ask Claude to generate or refactor a PHP class containing an associative array that maps Cyrillic / Hebrew / Latin Extended characters to ASCII equivalents (a few hundred entries is enough).
  3. The response is rejected with Output blocked by content filtering policy. Retrying and starting fresh sessions both reproduce it.

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"}

API Error: {"type":"error","error":{"details":null,"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":"req_011Cagnt8WGoeBo9eeWcQdpj"}

Hypothesis

The classifier appears to flag large character-mapping tables as reproduced reference data (Unicode tables, ICU transliteration data, etc.) regardless of whether the mapping is hand-curated for a specific domain. This is a meaningful false-positive class that will affect any developer working on:

  • Internationalization (i18n) and locale-specific normalization
  • Search / fuzzy-matching pipelines that need transliteration
  • Slug generation for non-Latin content
  • Music, book, or other metadata reconciliation across catalogs

Suggested mitigation: weight character-map outputs by whether the mapping is a verbatim copy of public Unicode/ICU data versus a novel domain-specific curation. A simple signal: domain-specific maps almost always have asymmetric or opinionated entries (e.g. "ø" → "oe" rather than the ICU default "o") that pure reference data does not.

The request IDs above should let the team trace exactly which output was blocked.

Claude Model

Opus

Is this a regression?

I don't know

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

Workaround I'm using: keep the normalization table in a static config file (config/isrc/transliteration.php) and have Claude Code work only on the classes that consume it. Splitting the table by script (cyrillic.php, hebrew.php, latin_extended.php) also reduces the per-output size below whatever threshold the classifier is using.

extent analysis

TL;DR

The issue can be mitigated by weighting character-map outputs to distinguish between verbatim copies of public Unicode/ICU data and novel domain-specific curations.

Guidance

  • Review the character normalization table to ensure it contains asymmetric or opinionated entries that differentiate it from pure reference data.
  • Consider splitting the table into smaller segments (e.g., by script) to reduce the output size and potentially avoid triggering the content filtering policy.
  • Verify that the table is not a verbatim copy of public Unicode/ICU data, as this may be the cause of the false-positive error.
  • If the issue persists, try using a different approach to generate or refactor the character normalization table, such as using a static config file as a workaround.

Example

No code snippet is provided as the issue does not require a specific code change, but rather a reevaluation of the character normalization table and its generation process.

Notes

The provided workaround of keeping the normalization table in a static config file and splitting it by script may be a temporary solution, but a more robust fix would involve addressing the root cause of the false-positive error.

Recommendation

Apply the suggested mitigation by weighting character-map outputs to distinguish between verbatim copies of public Unicode/ICU data and novel domain-specific curations, as this approach is likely to resolve the issue without requiring significant changes to the existing codebase.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING