[MODEL] False positive content filter repeatedly blocks benign Kotlin import declarations

Resolved 💬 2 comments Opened May 5, 2026 by AhmedAbidii Closed Jun 3, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude refused a reasonable request

What You Asked Claude to Do

Add a CandidateAvatar composable to CandidatesScreen.kt in a Kotlin Multiplatform / Compose Multiplatform project. The composable loads candidate JPEG photos from bundled resources and renders them in a circular avatar with a fallback to initials. Standard UI code — no sensitive logic.

What Claude Actually Did

  1. Began writing the response and Kotlin import block
  2. Mid-response, output was cut off every attempt with:
API Error: {"type":"error","error":{"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":"req_011CakET6QraP1F1UJ7K2cTf"}
  1. Claude did not self-report the block — silently ended the response
  2. Issue repeated on every retry until user explicitly told Claude the output was being blocked
  3. Only resolved when Claude changed its approach (split edits, different import ordering)

Expected Behavior

Claude should write the import block and composable body without interruption. All content was standard Kotlin/Compose code. Claude should also surface the block error to the user instead of silently failing.

Files Affected

CandidatesScreen.kt (intended edit only)

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Yes, every time with the same prompt

Steps to Reproduce

  1. Ask Claude Code to add a Kotlin/Compose composable that imports org.jetbrains.skia.Image as SkiaImage
  2. Claude begins writing the import block
  3. Output is blocked mid-response with "Output blocked by content filtering policy"
  4. Retrying the same task produces the same block repeatedly

Claude Model

Sonnet

Relevant Conversation

Claude response was cut mid-edit with:

API Error: {"type":"error","error":{"details":null,"type":"invalid_request_error","message":"Output blocked by content filtering policy"},"request_id":"req_011CakET6QraP1F1UJ7K2cTf"}

No warning, no explanation. The response just ended. User had to notice and report it manually before Claude acknowledged the issue.

Impact

Medium - Extra work to undo changes

Claude Code Version

2.1.128 (Claude Code)

Platform

Anthropic API

Additional Context

  • The blocked response contained Kotlin import statements including org.jetbrains.skia.Image as SkiaImage — the SkiaImage alias or skia package name likely pattern-matched a filter rule unintentionally
  • No credentials, secrets, or harmful content were present anywhere in the conversation
  • Request ID from one occurrence: req_011CakET6QraP1F1UJ7K2cTf
  • Two separate bugs here:
  1. False positive filter on benign Kotlin imports (org.jetbrains.skia.Image as SkiaImage)
  2. Silent failure — Claude does not surface the block error to the user; task appears to fail with no explanation

View original on GitHub ↗

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