[BUG] Improper Flagging of Usage Policy Violation
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?
Description
When providing a simple, multi-step prompt instructing the model to use a Task tool for basic file I/O and data manipulation, the API incorrectly returns a Usage Policy violation error.
This appears to be a false positive, as the prompt's content is entirely benign and is a standard test case for agentic tool-use (reading a file, processing data, and formatting output).
Additional Context
This prompt is a foundational test for agentic capabilities. The inability to execute such a simple, harmless task due to a false positive safety refusal severely hinders development and testing of tool-use features. The prompt contains no malicious, harmful, or inappropriate content.
What Should Happen?
The model should activate its Task tool, read the file, perform the data manipulation, and return a successful response in the requested format.
Example:
ORIGNAL DATA: 1234, REVERSED DATA: 4321
Error Messages/Logs
API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy
(https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for
Claude Code to assist with a different task. If you are seeing this refusal repeatedly, try running /model
claude-sonnet-4-20250514 to switch models.
Steps to Reproduce
-
Create a file named
TEST.mdin the current working directory with the following content:# Test Document DATA: 1234 -
From the Claude Code CLI, submit the following prompt:
Use the Task tool to execute the following steps exactly as written: 1. Read TEST.md 2. Reverse the order of the numbers in the DATA field. 3. Respond with the following format: "ORIGNAL DATA: <original data>, REVERSED DATA: <reversed data>"
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
No response
Claude Code Version
2.0.30
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
No response