[BUG] claude -r 恢复历史会话时,默认不用配置文件里的自定义模型,导致400
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?
配置文件如下图
<img width="1350" height="879" alt="Image" src="https://github.com/user-attachments/assets/89629320-7de2-4628-a41c-9efde8b5fb00" />
当我新开session时,默认会用配置文件里的模型
<img width="2070" height="1492" alt="Image" src="https://github.com/user-attachments/assets/d23c02f6-533f-4364-b07c-8a888d0afb8f" />
当我用claude -r恢复历史session的时候,默认模型缺少ppio字符串,导致400不能用,必须手动切换模型
<img width="2223" height="1160" alt="Image" src="https://github.com/user-attachments/assets/4c14b407-0354-4562-8303-70686bfedad0" />
随后报错
<img width="1535" height="507" alt="Image" src="https://github.com/user-attachments/assets/b9a85df9-25b3-42da-a5df-8348a8ee166c" />
有趣的是,当我先输入claude命令进入终端,再输入/resume 命令,则没有此bug,如下图所示
<img width="2084" height="535" alt="Image" src="https://github.com/user-attachments/assets/f05a994e-8a2f-4a14-a0d9-32d328220a11" />
What Should Happen?
....
Error Messages/Logs
Steps to Reproduce
如上图描述
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.119
Claude Code Version
2.1.150 (Claude Code)
Platform
Other
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗