[BUG] The model field recorded in JSONL files under ~/.claude/projects/{project}/ does not match the actual model being invoked, leading to inaccurate usage tracking and billing calculations.
Resolved 💬 3 comments Opened Mar 6, 2026 by 007xuyl Closed Mar 9, 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?
The model name recorded in the JSONL file differs from the actual model being invoked, resulting in inaccurate billing statistics.
What Should Happen?
- Ensure the model field in JSONL files exactly matches the model ID used in the actual API request
- If model aliases or routing are used, log the specific model version that was actually invoked
Error Messages/Logs
Steps to Reproduce
- Execute any operation in Claude Code (using the default model claude-sonnet-4-6)
- Check the ~/.claude/projects/{project}/{session}.jsonl file
- Compare the model field in the file with the actual model used in the API call
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.63
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗