Why Coding Agents Fail Manual Signup and Onboarding Flows
The short answer
Coding agents fail signup flows because those flows are designed to detect and stop non-humans. Don’t make the agent better at solving human checks; give it the test-mode doors your auth stack already provides. As of November 15, 2026, the reliable pattern is:
- Bot detection / CAPTCHA → auth-provider testing tokens (e.g. Clerk Testing Tokens).
- Email verification → a programmable inbox (AgentMail, Mailosaur).
- SMS one-time passcodes → fictional test phone numbers (Firebase Authentication) or your provider’s test numbers.
- Repeated logins and onboarding wizards → log in once and reuse saved session state (Playwright
storageState). - Third-party services → a human creates the account; the agent gets a scoped credential.
Why do coding agents fail manual signup and onboarding flows? Email codes they cannot read, SMS sent to a real phone, CAPTCHAs and bot checks that flag headless browsers, and wizards that change between runs.
Where agents get stuck, and the fix for each
| Failure | What the agent sees | Fix | Tools (Nov 2026) |
|---|---|---|---|
| Bot detection blocks the sign-up request | Silent failure, 4xx, or endless challenge | Test-mode bypass token from your auth provider | Clerk Testing Tokens (__clerk_testing_token) |
| “Enter the code we emailed you” | No access to an inbox | Generated test inbox read via API | AgentMail (free: 3 inboxes, 3,000 emails/month; Developer $20/month), Mailosaur (from $20/month billed annually) |
| SMS one-time passcode | Code goes to a real phone | Fictional numbers with fixed codes | Firebase Authentication test phone numbers |
| CAPTCHA on a third-party site | Cannot proceed | Don’t automate it; human creates the account | Secrets manager + scoped API key |
| Multi-step onboarding wizard | Flaky selectors, state lost between runs | Seed the database or reuse authenticated state | Playwright storageState, seed scripts |
| Session expires mid-task | Redirect to login | Refresh stored state in a setup step | Playwright setup projects |
How to set it up
1. Add a test path to your own signup. If you use Clerk, fetch a Testing Token from the Backend API in your test setup and include it as the __clerk_testing_token query parameter on Frontend API requests; Clerk’s docs note that Testing Tokens work in development and production instances but with limitations in production. Most auth providers have an equivalent: look for “testing”, “test mode” or “bot protection bypass” in their docs.
2. Give the agent an inbox it can read. Create an inbox per test run, sign up with that address, poll the API for the newest message, and extract the code or magic link with a regex. Programmable inboxes also catch broken transactional emails, which a hard-coded bypass would hide. Our comparison of email APIs for AI agents covers sending too.
3. Use fictional phone numbers for SMS. Firebase lets you register test numbers and fixed codes in the console, which avoids consuming SMS quota and avoids sending real messages. Keep the list short and remove it from production projects you don’t test against.
4. Log in once, reuse the session. Playwright’s recommended pattern is a setup project that signs in and saves storageState to a file that all other tests load. For agents this means one deterministic login step, then every task starts already authenticated — no wizard replay.
5. Write it down for the agent. Put the test-signup recipe (which env vars, which inbox helper, which test phone number) in AGENTS.md so every session finds it. See how to onboard AI agents to your codebase.
What not to do
- Don’t disable bot protection globally for agent testing; scope bypasses to test tokens and test environments.
- Don’t hand the agent your personal email or phone. It will leak codes into logs and transcripts.
- Don’t let agents create accounts on third-party services. Terms of service usually require a human, and you will lose track of who owns the account. Broker credentials instead: best tools for brokering secrets to AI agents.
- Don’t solve CAPTCHAs with paid solving services in an engineering workflow; if a flow needs that, it needs a human.
For end-to-end testing agents that run these flows for you, see best AI QA testing agents.
Last verified: November 15, 2026.