Rainbear 在 ClaudeCode报400(thinking block)的解决方案 中发帖
最近在用cc写东西的时候遇到过几次400的错误,具体表现为
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.7.content.0: Invalid `signature` in `thinking`block"},"request_id":"req_xxxxxxx"}
解决步骤:
1、退出Claude Code
2、找到对话文件:
# linux or mac
ls -la ~/.claude/projects/
# win
dir %USERPROFILE%\.claude\projects\
# 在项目文件夹中查找最大/最新的 .jsonl 文件
备份并修复文件:
import json
filepath = "/path/to/you...