[BUG] claude code prefilling assistant messages when using claude model 4.6+

Resolved 💬 1 comment Opened Apr 23, 2026 by HumboldtC Closed May 27, 2026

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?

使用claude code时,用claude opus或sonnet 4.6及以上模型时报错This model does not support assistant message prefill. The conversation must end with a user message。经过初步排查,cc初始时出现此问题可通过/clear解决,说明是会话问题 ,而会话中出现此问题推测是由于网络问题导致api的response没能一次性返回,而cc不会补全对话,所以触发了prefill特性。

What Should Happen?

应当给出提示并自动补全被中断的会话

Error Messages/Logs

Steps to Reproduce

切换任一claude opus或sonnet 4.6及以上模型,在模型给出回复时配置网络模拟api无法一次性返回response遇到中断的情况。

Claude Model

Other

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.118

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗