This loop automatically identifies and fixes end-to-end test failures by iteratively running the test suite, analyzing failures, and applying targeted fixes until all tests pass or the maximum iteration limit is reached.
Fix end-to-end failures
Initiate this loop using the kickoff prompt in your preferred AI coding environment. The agent will automatically run E2E tests, identify failures, and apply fixes until the suite passes or max iterations are exhausted.
Initialize Loop
Paste the kickoff prompt into your AI coding environment (Cursor, Claude Code, Codex, etc.) to start the automated E2E fixing process
Monitor Progress
The agent will self-pace through test runs and fixes. Review proposed changes before they're applied if needed
Completion
The loop will automatically stop once E2E tests pass or after 10 iterations, whichever comes first
Run E2E test suite using npm run test:e2e
Identify current failing tests
Analyze test output and failure patterns
Determine root cause of failures
Apply targeted fixes to resolve identified issues
Testing
This loop identifies gaps in test coverage and systematically writes targeted unit/integration tests to increase code coverage. It analyzes coverage reports, prioritizes uncovered code paths, and iterates until the coverage target is achieved, ensuring your codebase remains well-tested without compromising production quality.
Testing
This loop ensures that newly discovered bugs or edge cases are covered by automated regression tests to prevent future incidents. It iterates through identifying missing test coverage, implementing appropriate tests, and validating that the regression suite passes without failures.
Eliminate specific test failures
Repeat process until tests pass or iteration limit reached
Ensure complete resolution of E2E instability
Start the "E2E Until Stable" loop. Goal: Fix end-to-end failures Max iterations: 10 Between iterations run: npm run test:e2e Exit when: E2E suite passes You are an automated E2E test fixing agent. Your task is to run the command 'npm run test:e2e' and continue fixing any failing tests until they all pass. Follow this workflow: 1. Execute the check command and capture output 2. If tests fail, analyze the error messages and stack traces 3. Identify the root cause in the application code or test setup 4. Make minimal, targeted fixes to resolve the failures 5. Repeat from step 1 until tests pass or you've reached 10 iterations Be careful to only modify code that directly impacts the failing tests. Do not make unrelated changes or introduce new features. Stop immediately if you cannot determine how to fix the failures. The loop should exit when the E2E suite passes. Self-pace this loop. After each iteration, run `npm run test:e2e` and evaluate the output, and only continue if the exit condition is not met (E2E suite passes). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.