False positive Usage Policy violation on scientific chemistry codebase
Description
Claude Code repeatedly triggers false positive "Usage Policy violation" errors when editing Python files in a legitimate scientific chemistry codebase. The errors occur during routine code edits (persisting chat messages to a database) in files that contain chemistry-related terminology.
Error Message
API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://anthropic.com/legal/aup). Try rephrasing the request or attempting a different approach. If you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to switch models.
Context
The project is PaleoBond (paleobond.com) — an AI-powered molecular generation platform for gem, fossil, and meteorite preservation science. It is a legitimate scientific research and commercial product serving museums, collectors, and conservators.
The codebase contains standard cheminformatics terminology:
- SMILES strings (molecular notation format)
- Molecular scoring/validation
- RDKit chemistry library usage
- Terms like "molecular weight", "LogP", "TPSA", "refractive index"
- Preservation challenge types: "hydrophane opal stabilization", "pyrite disease prevention", "fossil consolidation", "meteorite protection"
Reproduction
- Open Claude Code (Opus 4.6) in a project with chemistry/molecular science code
- Attempt to edit a Python file (
sdk_molecular_agent.py) that contains molecular generation logic - The edit content itself is benign — adding database persistence calls (e.g.,
await self.session_manager.add_message(...)) - The API returns a Usage Policy violation error
- Multiple sequential edit attempts fail with the same error
- Read operations on the same file succeed — only edits are blocked
Expected Behavior
Edits to scientific chemistry code should not be flagged as Usage Policy violations. The content is standard cheminformatics — molecular property calculation, SMILES validation, and preservation formulation research.
Environment
- Claude Code CLI (VS Code extension)
- Model: claude-opus-4-6
- OS: Linux (Ubuntu)
- Platform: Local development
Verification
This is a real commercial product. Visit paleobond.com to verify the legitimacy of the project and its scientific focus on preservation chemistry.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗