[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?

  1. Ensure the model field in JSONL files exactly matches the model ID used in the actual API request
  2. If model aliases or routing are used, log the specific model version that was actually invoked

Error Messages/Logs

Steps to Reproduce

  1. Execute any operation in Claude Code (using the default model claude-sonnet-4-6)
  2. Check the ~/.claude/projects/{project}/{session}.jsonl file
  3. 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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗