Gemini 3 Pro writing line numbers into changes

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I’m finding that the Gemini 3 Pro model running in Agent mode implementating a plan it had written is modifying files by including line numbers at the start of the lines. For example, the first 10 lines that it has written for a change to a .cpp file:

     2|#include "MyPlayerController.h"
     3|#include "MyGameInstance.h"
     4|#include "MyPlayerState.h"
     5|#include "MyGameMode.h"
     6|#include "ActorA.h"
     7|#include "MyCommon.h"
     8|#include "ComponentA.h"
     9|#include "ComponentB.h"
    10|#include "ComponentC.h"
...

The 10| is written directly into the file, and appears in the diff in version control.

Steps to Reproduce

Given Gemini 3 Pro a plan, and possibly a file of sufficient size (e.g. 1450 lines?), and click “Build” with that model selected.

Expected Behavior

No line numbers in the actual text

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.42 (user setup)
VSCode Version: 1.105.1
Commit: 2e353c5f5b30150ff7b874dee5a87660693d9de0
Date: 2025-12-01T02:18:26.377Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Gemini 3 Pro

For AI issues: add Request ID with privacy disabled

521947df-60e5-4209-8cec-69e2c96920df

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. Yeah, it looks like an issue with applying output with line numbers from the plan/diff directly into the file during Build with Gemini 3 Pro.

Could you please share:

  • Does it happen with other models (GPT-5.1, Claude 4.5)?
  • An example of the file size (number of lines) and reproducibility (every run or sometimes)?
  • A screenshot/video of the diff + exact steps?
  • Logs: View > Output > Cursor (during execution) and Help > Toggle Developer Tools > Console?

Share the info, and I’ll pass it to the team.

I’ve had to revert versions to the latest 2.0.x because issues with Anthropic models timing out/saying that they’ve disconnected were preventing me from doing my work, so it’ll be a little hard to get this info.

  1. I’ve not seen it happen with non-Gemini 3 Pro models before, no. I tend to use Sonnet 4.5 (now Opus 4.5) and Composer-1, and some GPT 5.1 models, and it has not shown up.
  2. The affected file was C++ in the range of ~1500 lines. It did this to other files, but not ALL files, strangely.

Getting at the rest of this is going to cost time and money to revert my install and try to reproduce this behavior by paying for Gemini 3 Pro output, unfortunately. If I get back into this state naturally and spot the behavior in-action, I can update this post.

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.