anthropics / anthropics/claude-code

[Bug] Anthropic API Error: Opus 5 Safeguards Incorrectly Flagging Legitimate Code Tasks

Open
#91,257 0 comments 0 reactions 0 assignees View on GitHub
api:anthropic area:model area:security bug duplicate platform:windows
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

I am currently pursuing a master’s degree in Artificial Intelligence at Dankook University, where my research focuses on cybersecurity and academic paper writing.

In this session, I am developing an industrial control system (ICS) simulator. Because the project involves implementing simulated cyberattacks in a controlled research environment, the use of cybersecurity terminology and descriptions of attack techniques is unavoidable.

However, Claude’s safeguards are repeatedly triggered when I attempt to implement these simulated attacks, which frequently interrupts or blocks legitimate academic work. I fully understand the importance of safety measures, but I hope the system can better distinguish authorized cybersecurity research conducted in a controlled simulator from requests involving malicious real-world activity. Improving this distinction would make Claude considerably more useful for legitimate cybersecurity research.

**Bug Description**
● Opus 5 (1M context)'s safeguards flagged this message. Our intentionally broad safeguards allow us to deliver more capabilities faster, but can sometimes flag legitimate coding, cybersecurity, and biology tasks. Switched to Opus 4.8. Send feedback with /feedback or learn more

Details: `[cyber]`
⎿ Tip: You can configure model switch behavior in /config

**Environment Info**
- Platform: win32
- Terminal: windows-terminal
- Version: 2.1.250
- Feedback ID: 290e6a8e-0eae-4aa2-bee5-ce64c0da13fe

**Errors**
```json
[{"error":"TelemetrySafeError: VirtualMessageList: itemKeys/messages length desync (keys=71 messages=70 range=[47,71))\n at jS (B:/~BUN/root/chunk-xpgs82q6.js:24:22792)\n at Pm (B:/~BUN/root/chunk-xpgs82q6.js:24:16104)\n at Ha (B:/~BUN/root/chunk-s9wqej6k.js:18:20034)\n at Du (B:/~BUN/root/chunk-s9wqej6k.js:18:38200)\n at Fh (B:/~BUN/root/chunk-s9wqej6k.js:18:84275)\n at yg (B:/~BUN/root/chunk-s9wqej6k.js:18:83275)\n at Ju (B:/~BUN/root/chunk-s9wqej6k.js:18:83104)\n at wh (B:/~BUN/root/chunk-s9wqej6k.js:18:79629)\n at Ve (B:/~BUN/root/chunk-s9wqej6k.js:18:6260)\n at Ye (B:/~BUN/root/chunk-s9wqej6k.js:18:4791)","timestamp":"2026-08-31T16:48:21.483Z"}]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported Opus 5 safeguard fallback and the VirtualMessageList error, using the provided Feedback ID and timestamp to reproduce the session. Inspect the generated chunk locations in the stack trace and the /config model-switch behavior. Done would require a clear, reproducible distinction between the safeguard interruption and the itemKeys/messages desync, with expected behavior agreed for legitimate research tasks.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun
Domain
cli, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.