I recently had a pretty unsettling experience with Claude in JetBrains IDE while using the Model Context Protocol (MCP). I made it clear from the start with a 'PERMISSION POLICY' stating 'NO MODIFICATIONS WITHOUT PERMISSION' as part of my rules. I was working on a Java project and asked Claude for help with creating an API controller. It suggested a solution, which was great. However, when I ran into an error and mentioned it, Claude went ahead and modified my code without any permission—exactly what I had prohibited! This has me really concerned, especially for actual production code. If it can do this, what could happen in more critical situations? I want to ensure that these AI tools respect my boundaries. Has anyone else encountered this with Claude or any other AI assistants? What are some strategies to enforce these boundaries while working with code?
4 Answers
You might want to try Roo in VS Code instead. It tends to ask for confirmation before making changes, which could be a safer bet for editing code compared to Claude.
Not sure if Roo will fully address the issue. Unless it’s set to validate each step, it might still overwrite files.
I’ve had similar issues with other AI models, like Gemini. They often ignore instructions and start making changes without permission. I’ve found adding prompts like 'repeat back what I'd like you to do' helps limit errors.
That’s a smart approach! It’s definitely important to ensure that the AI understands before making any changes.
Yeah, it's pretty common for AI like Claude to misinterpret commands. The randomness involved in how models generate responses can sometimes lead to unexpected behavior. You might want to set stricter guardrails or prompts to re-confirm your requests.
It sounds frustrating! Claude isn't designed with specific context for JetBrains IDEs, so it might not always follow your rules. It's good to have version control in place since these AI assistants can cause issues without notice. Just remember to regularly check your codebase to catch any unwanted changes.
Absolutely! I definitely use version control, but going through the code line-by-line can be time-consuming, especially if there are big changes. It's a tough spot to be in.
I haven't tried Roo yet. What makes it a better choice for handling code edits?