Composer is very buggy when editing markdown files with code blocks

There is something about markdown files with code blocks that completely breaks Composer. It will start writing the file, then as soon as there is a code block it closes the file and writes the remaining file content into the chat. The apply model then only applies that first part of the file before the code block.

Telling the model (Claude 3.5 Sonnet) to be careful with its syntax does not fix the issue. I think Composer’s syntax might be incapable of supporting markdown files with code blocks.

Repro steps:

  1. Open an existing project.
  2. Ask Composer to write docs for any part of the application.
  3. Composer tries to add a docs/something.md file.
  4. As soon as it tries to put a code block in the file, the remaining file content spills over into the chat and doesn’t get applied.

Cursor version: 0.39.6

P.S.: What’s up with all the failed Composer requests lately? I’ve emailed support multiple times with the request IDs and got no answer. Hope this can be fixed soon.