[BUG] "Output blocked by content filtering policy" when generating code for compliance/sanctions project

Resolved 💬 2 comments Opened Apr 4, 2026 by kayteng-maker Closed Apr 7, 2026

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?

When working in a compliance automation project (sanctions list checking, FATF data), Claude intermittently returns API Error 400: {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering policy"}}. This happens when Claude tries to generate or write Python files. The error has persisted across multiple sessions over 2 days. The project content is entirely legitimate — it's a corporate compliance tool for a licensed Singapore Corporate Service Provider that checks public government sanctions lists.

What Should Happen?

Claude should generate Python script files without triggering the content filter. The project context involves only public regulatory data sources (UNSC, FATF, MAS) and standard compliance terminology.

Error Messages/Logs

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

Steps to Reproduce

Open a project that has a CLAUDE.md referencing sanctions, FATF, TSOFA, AML/CFT compliance terminology
Ask Claude to generate a new Python script file
The Write tool call fails with "Output blocked by content filtering policy"
Retrying doesn't work.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.90 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

The project is a legitimate compliance automation tool for a Singapore-licensed Corporate Service Provider. It fetches publicly available sanctions and jurisdiction risk lists. The content filter appears to be triggered by the combination of compliance/AML terminology in the CLAUDE.md project context and the generated code. Request ID: req_011CZhuMEVvQWFhLgL3rjoLP

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗