Commit AI-to-human code percentage widget shows incorrect numbers

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The AI-written to hand-written code tracker seems to have issues tracking what code was written by AI and what code was hand written. I recently made a commit where I hand-wrote ~90 lines and used one single tool call to fix a clangd config pathing issue (9 lines added, 2 removed). However, after making the commit, the widget in the bottom right of the toolbar showed an AI-written percentage of 82.41%, which is clearly incorrect.

I’ve attached screenshots of the only edits made by the model in this commit as well as the percentage widget.

Steps to Reproduce

Use at least one composer call, hand write code, then commit.

Expected Behavior

The AI-to-human code ratio should be calculated and/or tracked properly. In my case, the percentage should have been far lower.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 3.15.6 (user setup)
VS Code Extension API: 1.128.0
Commit: a1f686545fd0ce8917bbd2449f733551a9bce420
Date: 2026-08-06T01:41:03.876Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Auto

Additional Information

Seems to be hit or miss – sometimes calculates correctly, sometimes not.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report and screenshots. I can see the widget showing 82.41% AI and the only Agent edit in the commit (9 added / 2 removed).

A couple important notes about this widget:

  • This is an informational productivity metric that’s calculated locally on your machine. It’s not related to usage limits, quota, or billing.
  • The AI vs hand-written attribution is heuristic-based, and it has known limitations. In particular, if lines get reformatted after saving and the formatter wraps or merges them (for example clang-format in C++), or if hand-written lines are mixed with AI edits in the same diff block, those lines can be incorrectly counted as AI. That can explain the higher percentage and the hit-or-miss behavior you noticed.

So in this scenario the number really can be inaccurate. It’s not something wrong with your setup. I’ve shared your details with the team. I can’t promise a timeline yet, but if there’s an update I’ll reply in the thread.

If the widget is getting in the way, you can usually hide it by right-clicking the status bar. Let me know if you notice anything else with this metric.