[BUG] Write Tool Freezes Due to Content Filter False Positive

Resolved 💬 8 comments Opened Dec 29, 2025 by dwsmith1983 Closed Mar 27, 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?

Claude Code freezes/hangs when attempting to write a CODE_OF_CONDUCT.md file for a GitHub repos. The API returns "Output blocked by content filtering policy" but Claude Code does not surface this error to the user, appearing to simply freeze.

What Should Happen?

We should be able to create GitHub code of conduct covenants easily with Claude.

Error Messages/Logs

The API returns a content filter block, but Claude Code doesn't handle it gracefully:

  2025-12-29T13:03:15.491Z [ERROR] Error streaming, falling back to non-streaming mode: {"type":"error","error":{"details":null,"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":"req_011CWb2Lu2X5EMxhMkRNA81m"}

  2025-12-29T13:03:25.173Z [ERROR] Error in non-streaming fallback: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":null}

  2025-12-29T13:03:25.174Z [ERROR] Error: Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":null}

Steps to Reproduce

  1. Open Claude Code in a git repository
  2. Ask Claude to create a GitHub Code of Conduct file (CODE_OF_CONDUCT.md)
  3. Claude begins processing but then freezes indefinitely
  4. No error message is displayed to the user

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

v2.0.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  1. Content Filter False Positive: Standard CODE_OF_CONDUCT.md content (based on Contributor Covenant) is being incorrectly flagged by the content filtering policy. This is legitimate open-source community documentation.
  2. Poor Error Handling: When the API returns this error, Claude Code does not display any message to the user. It simply freezes, making debugging impossible without manually inspecting ~/.claude/debug/ logs.

View original on GitHub ↗

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