Closed markmircea closed 1 week ago
Faced the exact same issue.
{/* ... (other form fields remain unchanged) ... */}
Faced this multiple times today. Instead of adding new changes and merging, it tried to replace everything.
I've seen a lot of posts on r/ClaudeAI/ regarding recent Claude behavior. But I don't know if this has anything to do with it.
I also have this issue with the fact that it only changes a part and add the rest stays unchanged but then deleting everthing else 👎
I just tweaked the tool prompts a bit in v1.3.41, can you please give that a try and see if you're still dealing with this issue?
@saoudrizwan Updated the extension. Still facing this randomly.
Been adding the following to the custom instructions:
Handling Non-Relevant Code — Never Delete Code to Bypass It: Avoid removing code even if it’s temporarily irrelevant. The existing code may provide valuable context, comments, or serve as a future reference. Focus only on modifying the lines required.
For sessions with a lot of requests, when the context drifts a bit, you can brute force it... don't approve, don't reject, just reprompt with that message 3 times or so, usually does the trick.
This unfortunately has gotten so much worse. It doesn't seem to happen on Anthropic's API, but does on Bedrock and OpenRouter now and I never really had this issue before. I tried your suggested prompt @gfsysa just now and it does seem to have corrected itself. Thank you.
Edit: Darn, it worked once but 4 times in a row now it just refuses to produce the file back to me, even though it's ~430 lines (so not huge).
It doesn't seem to happen on Anthropic's API,
Well, it does for me. But I've noticed it only happens on big files. Like in my case, this happens only when it tries to modify homepage.js which is 531 lines.
I spoke too soon. It's happening there now too.
Yup... this issue was apparent before with anthropic.com with pro account only sometimes. I would ask for the whole file, and it would correct. Now it's not.
UGH.
Same issue
this works for me :
You must NEVER replace any existing code with placeholders of the type " // ... (previous code remains unchanged)" or " // ... (other functions remain unchanged)" or " // ... (rest of the code remains unchanged)" or variants. Instead, you must only modify the specific functions that need to be updated or add new ones.
Imo giving claude a specific tool for doing single line changes might help.
@Pgz1975 I tried this prompt instruction as well, but it doesn't seem to be working on my end. :/ It might work if I push it multiple times - but at two times so far (plus custom instructions), it's still trying to remove the whole file.
Thank you so much for continuing to update the extension. I was so excited to see that this is being addressed. Unfortunately, I still see it happening on my end. :(
v1.5.6 now let's you edit Claude's changes before accepting! When he edits or creates a file, you can modify his changes directly in the right side of the diff view. You can even hover over a 'Revert Block' arrow button in the center to undo // rest of code here
shenanigans when he deletes a bunch of code.
like the title says...