claude-code - 💡(How to fix) Fix [BUG] DUPLICATES: #16159 -- API Error: Output blocked by content filtering policy when attempting to write CODE_OF_CONDUCT.md [1 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#60426Fetched 2026-05-20 03:58:51
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×5

Error Message

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.

Error Messages/Logs

  1. It reliably throws the error
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 (please file separate reports for different bugs)
  • 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

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