[BUG] DUPLICATES: #16159 -- API Error: Output blocked by content filtering policy when attempting to write CODE_OF_CONDUCT.md

Resolved 💬 1 comment Opened May 19, 2026 by djwmobley Closed Jun 18, 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?

Repeated attempts across multiple sessions result in the API error (sometimes 400, sometimes no error code precedes the message). CONTRIBUTING.md worked, CHANGELOG.md worked, but the triplet of files kept dying with that error every time with CODE_OF_CONDUCT.md, which is a typically included file for open source projects. It also happened when asking Claude (Opus 4.7 xhigh) to write a python harness to write it instead.

What Should Happen?

It should write the file - there is no reason for it to be blocked.

Error Messages/Logs

Steps to Reproduce

  1. Attempt to have Opus write CODE_OF_CONDUCT.md as part of the accompanying document set for an open source project
  2. It reliably throws the error

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.143

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗