Please run /login API Error: 403 f"error":f"code":"", "message":"This token has no access to model claude-sonnet-4-6 (request id: 20260407xxxxxxxxxxxxx)", "type": "new_api_error"}}401 {"error":{"code":"","message":"无效的令牌 (request id: 20260xxxxxx48339k4HmiMwG)","type":"new_api_error"}}!!Auth conflict: Both a token (ANTHROPIC_AUTH_TOKEN) and an API key (/login managed key) are set. This may lead to unexpected behavior.
Trying to use ANTHROPIC_AUTH_TOKEN? claude /logout
Trying to use /login managed key? Unset the ANTHROPIC_AUTH_TOKEN environment variable.401 {"type":"error","error":{"type":"expired_api_key_error",''message": "Your API key hasexpired.}API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.7.content.0: Invalid signature in thinking block"},"request_id":"req_xxxxxxx"}ls -la ~/.claude/projects/dir %USERPROFILE%\.claude\projects\import json
filepath = "/path/to/your/session.jsonl"
with open(filepath, 'r') as f:
lines = f.readlines()
with open(filepath, 'w') as f:
for line in lines:
if not line.strip():
continue
data = json.loads(line)
if 'message' in data and 'content' in data['message']:
if isinstance(data['message']['content'], list):
data['message']['content'] = [
c for c in data['message']['content']
if c.get('type') not in ('thinking', 'redacted_thinking')
]
f.write(json.dumps(data) + '\n')参考来源:https://github.com/anthropics/claude-code/issues/10199#issuecomment-3600387852