Skip to content

Cursor Agent Chat activity is detected, but AI Coding Tokens and Cost metrics are not updated #1513

Description

@1chooo

Describe

WakaTime successfully detects coding activity from Cursor's Agent Chat and correctly attributes the changed lines to the AI models being used.

For example, my current AI coding activity is shown as:

  • Sonnet — 2,685 lines (58.23%)
  • GPT — 1,033 lines (22.40%)
  • Opus — 550 lines (11.93%)
  • Grok — 192 lines (4.16%)
  • Composer — 151 lines (3.27%)

The activity is also correctly detected as coming from Cursor.

However, the AI Coding section of the WakaTime dashboard does not update the Tokens or Cost metrics. These remain empty or unchanged even though Cursor Agent Chat is actively using AI models and WakaTime is successfully detecting the resulting code changes.

Expected behavior

When AI coding activity from Cursor Agent Chat is detected, the AI Coding dashboard should ideally also track and display:

  • Input tokens
  • Output tokens
  • Total tokens
  • Estimated cost

Actual behavior

  • Cursor is detected successfully.
  • AI-generated code changes are detected successfully.
  • AI model attribution and line changes are shown successfully.
  • Tokens and Cost in the AI Coding dashboard are not updated.

Environment

  • Editor: Cursor
  • Feature: Agent Chat
  • WakaTime: Latest version
  • WakaTime CLI: Latest version
  • OS: macOS
  • Platform: arm64 (Apple Silicon)

Is token and cost tracking for Cursor Agent Chat currently supported, or does WakaTime require additional integration with Cursor's Agent Chat usage data?

Logs

{"level":"error","now":"2026-06-29T01:38:13-07:00","caller":"cmd/run.go:304","func":"github.com/wakatime/wakatime-cli/cmd.runCmd","message":"failed to run command: sending ai activity failed: failed making request to \"https://api.wakatime.com/api/v1/users/current/heartbeats.bulk\": retry request failed: Post \"https://2604:a880:4:1d0::2a7:b000/api/v1/users/current/heartbeats.bulk\": dial tcp [2604:a880:4:1d0::2a7:b000]:443: connect: no route to host. original error: Post \"https://api.wakatime.com/api/v1/users/current/heartbeats.bulk\": dial tcp: lookup api.wakatime.com: no such host","version":"v2.21.2","os/arch":"darwin/arm64","file":"","time":0,"plugin":"cursor/1.105.1 vscode-wakatime/30.2.1"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions