Editor Randomly Displays Hundreds of "NUL" Characters Until Prompting the AI (macOS Tahoe)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hi Cursor team,

I’ve recently started experiencing a strange editor issue on macOS Tahoe (latest version) that I haven’t seen before.

While working normally, an open file will suddenly become visually corrupted and the editor fills with hundreds of “NUL” labels across the screen (see attached screenshot).

What happens
The file is displayed with hundreds of NUL markers throughout the editor.
The actual file on disk does not appear to be corrupted.
The issue seems to be purely a rendering/display problem.
If I send a prompt to the AI or trigger another editor update, the file immediately renders normally again.
After some time, the issue can reappear.
Additional observations
This has only started happening recently.
I haven’t noticed any specific action that consistently triggers it.
The problem affects the editor view rather than the actual file contents.
Saving the file doesn’t seem to be the cause.
It appears to resolve temporarily after the editor refreshes itself (for example, after interacting with the AI).
Environment
OS: macOS Tahoe (latest)
Latest version of Cursor

then on later prompt cursor fixes this saying: Index.tsx is UTF-16, which breaks the parser. Converting it to UTF-8 and scanning related Activity Dashboard files for the same issue.

Has anyone else experienced this issue? If there’s any logging or diagnostics I can provide to help investigate, I’d be happy to collect them.

Thanks!

Steps to Reproduce

its random

Expected Behavior

it should always write in required format

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.9.8
VS Code Extension API: 1.105.1
Commit: 4aa8ff1b7877ed7bd01bcba308698f71a6735380
Date: 2026-06-25T01:39:30.490Z
Layout: editor
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.256
OS: Darwin arm64 25.6.0

For AI issues: which model did you use?

any model

For AI issues: add Request ID with privacy disabled

24389903-56ac-4401-b583-1d8d1969fadf

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi @MediCall_Official Thanks for reporting this and for including the screenshot and Request ID.

I confirmed that this is not only a display issue. In this case, Agent’s file-writing tool saved Index.tsx as UTF-16 LE even though the generated content was normal text. That produces the NUL markers visible between characters in the diff.

We’re tracking this encoding issue internally. There is not a shipped fix or timeline I can share yet. However, we will keep you apprised of any updates here.

To recover an affected file:

  1. Click the encoding indicator in the bottom-right status bar.
  2. Choose Reopen with Encoding, then UTF-16 LE.
  3. Click the encoding indicator again and choose Save with Encoding, then UTF-8.

The conversion is reversible, but I recommend reviewing the Git diff or creating a clean commit first. Settings such as files.encoding: "utf8" may help with normal editor saves, but they do not reliably prevent this Agent write-path issue.