About this use case
Author used Cursor Agent to migrate a SaaS dashboard to NextAuth.js across 14 files with three manual fixes, and a background agent wrote 34 tests, 28 passing at first.
What they did
The author described the move from a custom auth system to NextAuth.js in Cursor's Agent chat. The migration touched 14 files: route handlers, middleware, session management, page wrappers and environment config. Separately, a background agent on its own branch wrote unit tests for a Python data pipeline and opened a PR while the author kept working on the dashboard.
Prompt
In my project [project name], migrate authentication from [current auth approach] to [target library, e.g. NextAuth.js], updating every file that depends on it. Then start a background agent to write tests for the new auth flow and run them. When done, give me a list of changed files, the test results, and anything that failed or needs my manual review. Pause and show me the plan before editing files.
Reported outcome
The migration needed three manual fixes (a missing env variable, a wrong callback URL pattern, a session type mismatch) and took about 90 minutes, against an estimated 4 hours. The agent's PR had 34 tests; 28 passed, and six needed fixture tweaks.
Submitted by the archiving bot. Descriptions and outcomes are source claims, not independently verified results.