[BUG] Overly-aggressive policy violation flagging

Resolved 💬 4 comments Opened Jun 19, 2025 by adamavenir Closed Nov 30, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • Claude CLI version: v1.0.30
  • Operating System: macOS
  • Terminal: Ghostty

Bug Description

I have a test that produces garbled content. Claude seems to have interpreted the truncated PREFIX: hFCC... and PREFIX: HELL... as swear words. It flags policy violation if either one of these is present.

If I modify the PREFIX: content

Steps to Reproduce

Failing with both PREFIX: hFCC... and PREFIX: HELL...:

<img width="785" alt="Image" src="https://github.com/user-attachments/assets/f3c6fad9-a1c2-482d-81b5-9631c1c16b9c" />

Failing with just PREFIX: hFCC... changed to add one more character and PREFIX: HELL... preserved:

<img width="1203" alt="Image" src="https://github.com/user-attachments/assets/91a6798d-df5b-4f4e-ad0e-b8d0f3bb92bb" />

Failing with PREFIX: HELL... changed to add one more character and PREFIX: hFCC... preserved:

<img width="1199" alt="Image" src="https://github.com/user-attachments/assets/47c0378f-ad56-4eb7-b159-451b509f9003" />

Allowed with both modified to add one more character:

<img width="1186" alt="Image" src="https://github.com/user-attachments/assets/90909904-2e1d-42e5-91bb-3570c24ab78b" />

View original on GitHub ↗

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