Skip to content

Claude Code 1.0.9 no longer reports the costUSD field #4

Description

@nnamon

It appears that Claude Code 1.0.9 no longer includes the costUSD field that ccusage is using to track the costs in the session log files:

{
  "parentUuid": "9194323f-ea9c-486a-be20-599e666df380",
  "isSidechain": false,
  "userType": "external",
  "cwd": "/Users/nnamon/projects/mcp/playwright-mcp",
  "sessionId": "0a9a8045-53e9-44b1-83fb-aafc6e1f4f0b",
  "version": "1.0.9",
  "message": {
    "id": "msg_018vkDifij3YKNQ5gzjtvbXz",
    "type": "message",
    "role": "assistant",
    "model": "claude-opus-4-20250514",
    "content": [
      {
        "type": "tool_use",
        "id": "toolu_01S3mjJhHAtzk1uuAU1cn85r",
        "name": "Bash",
        "input": {
          "command": "docker build -f Dockerfile.dev -t playwright-mcp-dev:latest . --no-cache",
          "description": "Rebuild Docker image with the fix"
        }
      }
    ],
    "stop_reason": "tool_use",
    "stop_sequence": null,
    "usage": {
      "input_tokens": 3,
      "cache_creation_input_tokens": 161,
      "cache_read_input_tokens": 89356,
      "output_tokens": 97,
      "service_tier": "standard"
    },
    "ttftMs": 3382
  },
  "requestId": "req_011CPkCWc21qrE6dGwSHMcw1",
  "type": "assistant",
  "uuid": "03a7a350-a7db-4fcb-8844-aded9b69e7a8",
  "timestamp": "2025-06-02T22:40:37.397Z"
}

The model and token counts are still included, however. This probably means that the costs could be calculated for these by multiplying them with their listed prices?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions