[BUG] claude code prefilling assistant messages when using opus 4.6
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?
When using the latest Claude Code version (v2.1.56) and switching to Opus (1M context), I found that Claude Code performs prefilling of assistant messages (last-assistant-turn prefills) on some requests, resulting in HTTP 400 errors.
However, according to the official documentation, Opus 4.6 no longer supports this behavior (https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-6#prefill-removal).
What Should Happen?
When using the latest Claude Code version (v2.1.56) and switching to Opus 4.6, Claude Code should not performs prefilling of assistant messages.
Error Messages/Logs
Steps to Reproduce
Switch to Opus 4.6 and have it explore any code repository
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.56 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗