Deathloop - Backend Admin User Creation and Log In

Imagine this - you have spent the day vibe coding away and have a working prototype for a repl with a public-facing user side and an admin user side to manage the content displayed on the public-facing side.

It works great during development - the log-in functionality is perfect for the sole admin credentials your agent created for you. You have one last feature you’d like to add before deploying it… the ability to create and manage new admins because lord knows you have already spent enough time and money building the thing to then also have to manage it fully once it is deployed.

You ask your agent to create an admin user page to do this - the agent spins it up fine. You make a new user and test the credentials… no dice.

What then ensues is one of the nastiest death loops with replit that I have consistently experienced - no prompt can fix it, manually testing the user creation and then login doesn’t work because things are already locked down, your user table is dropped, you can’t insert new credentials, you have been locked out…

So far, I can only see two solutions to this give up and roll back the database/git commits and manage the backend yourself / pass around your admin credentials like a noob or start from square one.

I hate these two options. There has to be a way around this problem. Has anyone else experienced this issue, and if so - what did you do to fix it?

Best option when in a death loop is always Rollback. The earlier and more liberally you use them the better. Good practice is to never keep Agent work that’s broken, always hit rollback and reattack the problem by providing additional context and info about what NOT to do, and the agent tends to do better.

Agent is always worse at fixing something it broke vs resetting and trying to scope your prompt down such that it can do it in 1 go

1 Like