Symptoms
- Cascade edits files you did not mention
- Working features break after a small request
- Code style changes from file to file
- Reviewing changes takes longer than writing them
Why it happens
Agents like Cascade try to finish the whole task in one go. When the request is broad, they decide on their own what else needs changing, and they are often too eager.
You can steer that. Give the agent rules to follow, tell it exactly where to work and keep a saved version so a bad change costs you nothing.
Try this first
-
Save a version before every request
Commit your work before you ask Cascade for anything. If the result is bad, you can go back in one step.
git add . git commit -m "Before: fix cart total" -
Add rules for Cascade
Windsurf lets you set rules that the agent follows in your project. Keep them short and clear. For example:
- Only change the files I mention. - Do not rename functions or files unless I ask. - Keep the existing code style. - Ask before adding a new package. -
Point it at the exact file
Mention the file or function you want changed in your request, so Cascade does not go looking for work elsewhere.
-
Read the changes before you accept them
Look at every changed file. Reject edits that have nothing to do with your request and ask again with a narrower prompt.
-
Keep requests small
One bug or one feature per request. Bigger tasks can be split into steps you check one by one.
When to stop and call a person
Get a developer to look at the project when changes keep breaking unrelated features, or when the code has drifted so far that nobody knows how the parts fit. A cleanup plus a few tests makes the agent far more useful afterward.
Questions people ask
Should I turn off the agent?
No. Use it with rules and smaller tasks. It is still a big time saver.
Do rules work every time?
Not perfectly. They reduce unwanted changes a lot, but reviewing the diff is still your safety net.