Agent lost it's mind and started doing weird things

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Asked the agent to make a code change. Part way through it seemed to have forgotten how to read and write files normally?
It was using powershell scripts to read files, and started making backup files (.bak) files whenever i made a file change. It started to write python scripts to change files instead of just writing to them.

The request also took an immensely long time and burned through far more tokens then I expected.

Truly bizzarre behavior.

It went on for 10 minutes before i eventually decided to just kill the request.

Steps to Reproduce

No idea

Operating System

Windows 10/11

Version Information

Version: 3.19.13 (user setup)
VS Code Extension API: 1.128.0
Commit: dd066f332fcea7382764400fde902f61920648d0
Date: 2026-09-04T17:41:16.065Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 42.10.0
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.22631

For AI issues: which model did you use?

Grok 4.5 High

For AI issues: add Request ID with privacy disabled

a8186241-25ec-4cef-b383-48911de595ed

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @zanawar!

I traced that run. Your file tools were working fine the whole time. The model itself decided to reach for PowerShell/Python scripts and .bak copies instead of its built-in edit tools, which is why it dragged on and burned tokens. That isn’t intended behavior and it’s nothing in your setup. We’ve let the team know and it’s an issue we’re tracking.

If it happens again: stop the run and reply “use the built-in edit tools directly, no helper scripts or backups.” Switching that chat to Grok 4.5 with Fast on, or to Grok 4.6, also tends to get it back to normal. A fresh request ID if it recurs would help me confirm it’s the same thing.

It seems to keep doing stuff like this; starts to use git and powershell Select-Object to read lines;

Here’s another Request ID:
9cf69bd2-ef87-40bb-945d-5134da475f68