# Cursor Chat creating new files instead of modifying existing on APPLY

**URL:** <https://forum.cursor.com/t/cursor-chat-creating-new-files-instead-of-modifying-existing-on-apply/53061>\
**Category:** Bug Reports\
**Created:** [February 22, 2025, 5:37am UTC](https://forum.cursor.com/t/cursor-chat-creating-new-files-instead-of-modifying-existing-on-apply/53061 "2025-02-22T05:37:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason5900](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@Jason5900](https://forum.cursor.com/u/Jason5900)\
**Post date:** [February 22, 2025, 5:37am UTC](https://forum.cursor.com/t/cursor-chat-creating-new-files-instead-of-modifying-existing-on-apply/53061/1 "2025-02-22T05:37:53Z")

</div>

Hi, when i apply in cursor chat its creating new files instead of modifying existing files (model claude 3.5 sonnet) working fine on gpt but i want to use claude.

---

<div class="post-metadata">

**Author:** ![PythonX](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@PythonX](https://forum.cursor.com/u/PythonX)\
**Post date:** [March 12, 2025, 5:31pm UTC](https://forum.cursor.com/t/cursor-chat-creating-new-files-instead-of-modifying-existing-on-apply/53061/2 "2025-03-12T17:31:21Z")

</div>

I have the same problem with Clause-3.7-sonnet. When I have a lot of syntax problems in the code, if I ask the agent to fix them, the agent will by default generate separate scripts and other files instead of working directly from within the existing file.

The agent recently added 50 problems to my code when completing a simple (but time consuming) task to add various debug logs. When I asked the agent to fix the problems, by the time it was done I had over 40 new files in the folder and none of the problems were fixed in the file I wanted fixed.

There should ideally be an option to by default restrict the agent or AI assistant to only making changes in the current file.

---

<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:** [December 21, 2025, 8:57am UTC](https://forum.cursor.com/t/cursor-chat-creating-new-files-instead-of-modifying-existing-on-apply/53061/3 "2025-12-21T08:57:46Z")

</div>

Closed on December 21, 2025, 8:57am UTC

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