Composer has gotten wacky!

I am fairly new to Cursor, having recently made the switch from VS Code, Claude-Dev and Aider. Everyone on Twitter and Youtube constantly singing its praises, so here we are…

As some others have stated, when working a greenfield project and trying to build the structure of a project, it is a life saver. Beyond that you better know what you are doing!

Today’s issue:

I am using Python Flask and trying to build a Knowledge Base system.

I am asking Composer / Claude 3.5 to make some seemingly simple style changes to some HTML files. I like how it styled one of the pages and want it to use the same styling on another page. It keeps changing code but when I go to my browser to check the changes, nothing is changed. This went on for a very long time until I noticed… it was making changes to a root level “/admin” directory rather tha n “/templates/admin” directory, which is out of bounds in Flask.

Why is it doing this? No idea but I will watch it more closely.

So I deleted the root level “/admin” directory and hoped that would fix things but no luck.

I checked the console and see lots of errors like “Error: Unable to read file ‘/templates/admin/topic.html’ (Error: Unable to resolve nonexistent file ‘/templates/admin/topic.html’”. That files DOES NOT exist so that’s why it can’t read it.

It is also trying to create a directory that already exists: “error in runFastApplyOnCodeBlock Error: Unable to write file ‘/static/styles.css’ (Unknown (FileSystemError): Error: EROFS: read-only file system, mkdir ‘/static’)”

There are several similar examples.

So I went into settings and tried to re-index it, but that also did not help.

Code generation gets stuck on Applying… and never comes home or reports an error.

I just upgraded to pro having been impressed by the easier tasks I threw at it but now I wonder if I wasted my money…

How can I properly force a re-index so it is not looking for non existent files? And how did I get here? :slight_smile:

3 Likes

thank you for reporting this we are looking into it and it will be fixed by next build

2 Likes

Can I get some info on the cause and how to clean up my existing project? I am stuck and screwed until this is resolved.

1 Like

Hello? Anyone here from Cursor support?

1 Like

Yes, this is a major issue. I’m using React and somehow Composer doesn’t know what files are in the project, even with a codebase refresh and using @codebase. It’s constantly referring to files I’ve long deleted. The file search to add to composer returns results from a folder I deleted a week ago.

1 Like

Hi @ChiefRemote

I’m here. Thanks for the information. The Cursor team is already working on fixing the issue.

1 Like

@deanrie Any updates?

About a week ago I had it repeatedly creating a new folder in my python project directory and in it creating duplicately named files to files already existing in the root of my project folder… and then writing new code to them, sometimes duplicate code sometimes not.
And despite my catching on to this, it kept doing this from time to time whenever I forgot to keep a close eye on it.

It took me hours to unwind the mess it made.

hi, in our new 0.41 update, we’ve added checkpoints to help with cases of composer writing unwanted code and created unwanted files/folders. i would recommend next time this occurs to you, checkout to a prev state and start from there. checking out to a prev state will undo the composer changes and remove any newly created files / folders.

as for the errors around creating new files (i.e the Unable to read file), we’ve made some changes around how we handle new files / folders, so these bugs should be addressed now. thank you for your feedback, please let us know if you experience any other issues

@balta Thanks for the update. A couple of questions:

Who can I contact to get credits for my wasted requests?

I first started seeing Cursor Composes fail when it appeared to be making code changes but I was seeing no real effect. Turns out it was making changes to the wrong files. See my original post in this thread. Has this also been fixed?

I felt like I had a lot of momentum and now don’t really trust Cursor any more. It will take some time for that confidence to return.

Sorry for this! Could you message me the email you use for Cursor so I can issue a refund?

We are continuously working on having better code generation so composer changes the correct files.

For the next update we will also explicitly show the directory of the files the composer is changing in case of any files with the same name to prevent this issue in the future.

1 Like

Hi @ChiefRemote,

Just gone ahead and refunded. Should go through within a few days.

1 Like

I am happy to report these bugs do indeed seem to be fixed in the latest version. Looking very good so far!