You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After seeing a "Malformed" error response from Aider, which didn't like Claude's answer, Aider still applied the updates. When Claude immediately sent a second, "corrected" set of updates at Aider's requests, these were also applied (and accepted without complaint). But the resulting code is clearly erroneous, with duplicated lines, unreachable code, and missing variables.
Related notes:
I clearly in the conversation made only 3 requests, but aider made 4 commits
Two commit messages are extremely long and include the full conversation with Aider, as well as the diff itself making the commit message a whopping 4.5 pages long. Example below. This seems like also a possible mistake since the two other commit messages are concise and do not contain the full conversation with the LLM, including code diff, as part of the message. But this also happened with some subsequent requests, so maybe this is actually a (surprising?) default. I figured out how to change the options so commits wouldn't happen automatically, but the issue still happens (malformed request is immediately applied to the files, but aider also continues to automatically ask the LLM to correct it).
I thought this problem might be due to interspersing another commit with Aider's commits, but the external commits did not modify the same files at all so it seems that should not be the problem. I also repro'd the same error (below) without any other commits happening.
Example of unreachable code:
(These mistakes caught my attention since I've used Opus quite a bit directly in the web interface and it has never produced obvious, compile-preventing errors, as happened multiple times in a row here. I am pretty sure it is due to how the diff is being applied.)
Malformed response #1, retrying...
https://aider.chat/docs/faq.html#aider-isnt-editing-my-files
InvalidEditBlock: edit failed!
index.ts does not contain the *exact chunk* of SEARCH lines you specified.
Try again.
DO NOT skip blank lines, comments, docstrings, etc!
The SEARCH block needs to be EXACTLY the same as the lines in index.ts with nothing missing!
index.ts does not contain these 22 exact lines in a row:
...
Malformed response #1, retrying...
https://aider.chat/docs/faq.html#aider-isnt-editing-my-files
InvalidEditBlock: edit failed!
index.ts does not contain the *exact chunk* of SEARCH lines you specified.
Try again.
DO NOT skip blank lines, comments, docstrings, etc!
The SEARCH block needs to be EXACTLY the same as the lines in index.ts with nothing missing!
index.ts does not contain these 1 exact lines in a row:
...
Version and model info
Aider v0.31.1
Models: claude-3-opus-20240229 with diff edit format, weak model claude-3-haiku-20240307
Git repo: .git with 9 files
Repo-map: using 1024 tokens
I hope it's an easy fix, this seems like quite a promising tool!
Edit: I've verified this again trying to make changes in a different code base. So far about half of responses have been identified as Malformed. Here is a partial log of the Aider output. I canceled the "correction" response but verified that the original "malformed" response was nevertheless applied.
These changes should resolve the errors related to the updated return value of getIdsFromTags. The callers now destructure the returned object
and access the appropriate properties to get the desired IDs.
Please let me know if you have any further questions or if there are any other issues you need assistance with.
src/ImportHtml/HtmlFileUploadControl.tsx does not contain the exact chunk of SEARCH lines you specified.
Try again.
DO NOT skip blank lines, comments, docstrings, etc!
The SEARCH block needs to be EXACTLY the same as the lines in src/ImportHtml/HtmlFileUploadControl.tsx with nothing missing!
src/ImportHtml/HtmlFileUploadControl.tsx does not contain these 2 exact lines in a row:
I apologize for the confusion. Let me provide the correct changes for the callers of getIdsFromTags in the
src/ImportHtml/HtmlFileUploadControl.tsx file.
The text was updated successfully, but these errors were encountered:
lukewlms
changed the title
"Malformed response" is still applied, resulting in mangled output
"Malformed response" is still applied and committed, resulting in mangled output
May 3, 2024
I read the FAQ - I have not tried with a different model than Claude Opus.
There were probably ~6-8 pages of code included from the relevant files, but from what I recall it repro'd with less code
My read was that changes were being applied despite the malformation, when I would expect Aider to decline to apply changes if the format is incorrect (since it's asking the LLM for a redo)
I recently made some improvements for partially applied edits. The change is available in the main branch. You can get it by installing the latest version from github:
Issue
After seeing a "Malformed" error response from Aider, which didn't like Claude's answer, Aider still applied the updates. When Claude immediately sent a second, "corrected" set of updates at Aider's requests, these were also applied (and accepted without complaint). But the resulting code is clearly erroneous, with duplicated lines, unreachable code, and missing variables.
Related notes:
Example of unreachable code:
(These mistakes caught my attention since I've used Opus quite a bit directly in the web interface and it has never produced obvious, compile-preventing errors, as happened multiple times in a row here. I am pretty sure it is due to how the diff is being applied.)
Aiden's log during conversation:
Version and model info
Aider v0.31.1
Models: claude-3-opus-20240229 with diff edit format, weak model claude-3-haiku-20240307
Git repo: .git with 9 files
Repo-map: using 1024 tokens
I hope it's an easy fix, this seems like quite a promising tool!
Edit: I've verified this again trying to make changes in a different code base. So far about half of responses have been identified as Malformed. Here is a partial log of the Aider output. I canceled the "correction" response but verified that the original "malformed" response was nevertheless applied.
src/ImportHtml/HtmlFileUploadControl.tsx
<<<<<<< SEARCH
const { pageIds, sectionIds, joplinNoteIds, joplinFolderIds } =
getIdsFromTags(groupTag);
These changes should resolve the errors related to the updated return value of getIdsFromTags. The callers now destructure the returned object
and access the appropriate properties to get the desired IDs.
Please let me know if you have any further questions or if there are any other issues you need assistance with.
Malformed response #1, retrying...
https://aider.chat/docs/faq.html#aider-isnt-editing-my-files
InvalidEditBlock: edit failed!
src/ImportHtml/HtmlFileUploadControl.tsx does not contain the exact chunk of SEARCH lines you specified.
Try again.
DO NOT skip blank lines, comments, docstrings, etc!
The SEARCH block needs to be EXACTLY the same as the lines in src/ImportHtml/HtmlFileUploadControl.tsx with nothing missing!
src/ImportHtml/HtmlFileUploadControl.tsx does not contain these 2 exact lines in a row:
I apologize for the confusion. Let me provide the correct changes for the callers of getIdsFromTags in the
src/ImportHtml/HtmlFileUploadControl.tsx file.
src/ImportHtml/HtmlFileUploadControl.tsx
src/ImportHtml/HtmlFileUploadControl.tsx
<<<<<<< SEARCH
const allIdsToRemove = getIdsFromTags(ta
^C again to exit
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
src/Components/getPatch.test.tsx src/ImportHtml/HtmlFileUploadControl.tsx src/Joplin/JoplinShared.ts
The text was updated successfully, but these errors were encountered: