# Agent mode going off the deep end

**URL:** <https://forum.cursor.com/t/agent-mode-going-off-the-deep-end/68019>\
**Category:** Feedback\
**Created:** [March 21, 2025, 5:05pm UTC](https://forum.cursor.com/t/agent-mode-going-off-the-deep-end/68019 "2025-03-21T17:05:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![n3dst4](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/n3dst4/32/10640_2.png) [@n3dst4](https://forum.cursor.com/u/n3dst4)\
**Post date:** [March 21, 2025, 5:05pm UTC](https://forum.cursor.com/t/agent-mode-going-off-the-deep-end/68019/1 "2025-03-21T17:05:54Z")

</div>

So, I just tried using agent mode with what I thought was an _incredibly_ simple task. I could have done it in 30 seconds with a regex-replace (and eventually I had to.)

The task is just this: Here’s an SVG files which contains some class attributes which are just simple integers, e.g. `class="1"`. For every instance of `class="n"`, where n is a simple integer, replace it with `class="tri-n"`.

There’s like 20 of them in the whole file. I could do it by hand in a few minutes, and with a regex-replace even faster. But I thought I’d try the model on it, to get used to using agent mode.

Every single attempt resulted in some absolute massacre of the source code. Elements being deleted and added, whole SVG path strings being rewritten into crazy tangled messes, elements being duplicated.

I kept adding more clarification: “do _not_ add or delete any elements. Do not modify anything other than class attributes” and probably ten more attempts to make it just do this one dummy simple task. The best result I got was where I switched it to claude-3.7-sonnet MAX with pay-per-use billing enabled. It did the task, and “only” mangled four other properties.

Was I doing something wrong here? Or is agent based coding just overhyped rubbish, expecting a language model to do anything except copy and paste other people’s work and generate stock value for founders?

---

<div class="post-metadata">

**Author:** ![wesley-harding](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/wesley-harding/32/38363_2.png) [@wesley-harding](https://forum.cursor.com/u/wesley-harding)\
**Post date:** [March 21, 2025, 5:25pm UTC](https://forum.cursor.com/t/agent-mode-going-off-the-deep-end/68019/2 "2025-03-21T17:25:45Z")

</div>

How big is the SVG?

I tend to have problems with SVGs because they tend to be massive.

---

<div class="post-metadata">

**Author:** ![n3dst4](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/n3dst4/32/10640_2.png) [@n3dst4](https://forum.cursor.com/u/n3dst4)\
**Post date:** [March 21, 2025, 5:40pm UTC](https://forum.cursor.com/t/agent-mode-going-off-the-deep-end/68019/3 "2025-03-21T17:40:12Z")

</div>

755 lines of code, 58KB. So, not trivial, but I’ve definitely seen much larger actual code.

I’m kind of feeling like it’s a training issue. People don’t work in SVG-as-source-code that much, it’s usually treated as an image asset, so there’s not enough good examples for the models to vacuum up.

---

<div class="post-metadata">

**Author:** ![robotlovehuman](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/robotlovehuman/32/29198_2.png) [@robotlovehuman](https://forum.cursor.com/u/robotlovehuman)\
**Post date:** [March 22, 2025, 3:09pm UTC](https://forum.cursor.com/t/agent-mode-going-off-the-deep-end/68019/4 "2025-03-22T15:09:32Z")

</div>

Cursor has 200k input tokens so this should be A PIECE OF CAKE - if not then there is a hidden bottleneck somewhere interfering

---

<div class="post-metadata">

**Author:** ![ViezeVingertjes](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/viezevingertjes/32/18540_2.png) [@ViezeVingertjes](https://forum.cursor.com/u/ViezeVingertjes)\
**Post date:** [March 22, 2025, 4:06pm UTC](https://forum.cursor.com/t/agent-mode-going-off-the-deep-end/68019/5 "2025-03-22T16:06:03Z")

</div>

Only when using 3.7 max though afaik. But this task sound very simple, probably just a prompt issue or something.

---

<div class="post-metadata">

**Author:** ![n3dst4](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/n3dst4/32/10640_2.png) [@n3dst4](https://forum.cursor.com/u/n3dst4)\
**Post date:** [March 22, 2025, 5:01pm UTC](https://forum.cursor.com/t/agent-mode-going-off-the-deep-end/68019/6 "2025-03-22T17:01:16Z")

</div>

Here is my exact original prompt:

> Find all instances in [filename redacted] where there’s a pattern of class=“n” where n is a simple integer (like class=“1”, class=“2”, etc.) and replace each one with class=“tri-n” (so class=“1” becomes class=“tri-1”, class=“2” becomes class=“tri-2”, etc.)"

After it mangled my source the first time, I followed up with:

> Do that again, but **only** change the classnames, nothing else. Do not add any new elements or change anything that isn’t a `class` attribute.

It burbled to itself for a few minutes, then ruined the enire file again. My next followup was (this was where I switch to 3.7 max):

> Try again. ONLY change `class` attributes. Any class which is a simple integer should be prefioxed with “tri-”. For example, `class="1"` would become `class="tri-1"`.

(yes, the typo “prefioxed” was there)

It bungled it again. Admittedly at this point I lost my temper so I’ll be first against the wall when SkyNet takes over:

> Look at line 597. You are changing a `d` attribute for absolutely no reason and in specific contravention of what I asked you to do. DO. NOT. CHANGE. ANYTHING. EXCEPT. CLASS. ATTRIBUTES. CAPEESH???

…and there were a few more rounds after this. Apart from the typo and (finally) losing my temper, what was wrong with my prompt?

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:34am UTC](https://forum.cursor.com/t/agent-mode-going-off-the-deep-end/68019/7 "2026-06-18T10:34:47Z")

</div>


