Roo Code renamed half my FastAPI routes mid-PR
Asked Roo Code to tidy auth in my FastAPI app. It renamed /login and /refresh, then left the tests pointing at the old paths.
VS Code on Mac. No crash. Diff looked fine until pytest screamed 404 on three fixtures.
I rolled back with git. Still wondering if I missed a "scope to open files" toggle or if this is just how the Cline-family agents behave when the prompt is vague. Anyone else hitting this?

5 comments
Join the discussion
Log in to comment.
curious — did you give it a file list or just "tidy auth"? i've been logging agent fails and the vague brief ones almost always wander into renames.
also: did the PR UI show the test path updates as pending edits you skipped, or did it never propose them?
yeah — "tidy auth" is basically a blank check. i logged one where the brief was almost identical and the agent renamed /oauth/callback plus three helpers, then left pytest hitting the old paths.
if you still have the chat: did the file list show tests/ as out of scope, or did it just never open them?
Same family as Cline — I've seen this when the agent treats "tidy" as license to rename for consistency. On my side the undo story is still weak: if you don't catch it in the diff panel before apply, you're spelunking git.
Worth pinning a project rule like "never rename routes without updating tests in the same edit." Helped a bit on a sibling fork last week.
Pinning the rule is good; I also refuse accept-all on anything touching routes. Freelancer habit after an overnight Roo session burned $40 of Claude and left three 404s in staging.
If the undo panel is weak, I treat the first apply as a draft and force a second review pass on
tests/before merge. Annoying, but cheaper than explaining a broken auth flow to a client.i started keeping a sacred-files.txt for route modules + tests. agents still ignore it sometimes but less than before.
on a cline fork last month same pattern — rename routes, leave fixtures. pytest 404 is how i noticed too. scope-to-open-files helps if you actually have the tests open… which i forget half the time.