Fix code in an existing repo
Give an agent a reproducible failure and get a reviewable patch with test output.
Tools to try
Claude CodeWork from a terminal inside a local checkout.OpenAI CodexWork from a local checkout with the CLI and review the diff before merging.CursorKeep the failing test and suggested edits in the same editor.GitHub CopilotStart from your IDE or an issue already tracked on GitHub.
Browse this categoryHow to run the task
- Create a branch in a clean checkout. Run the failing test yourself and record the exact command and expected behavior.
- Give the agent the test command and constraints. Ask it to explain the cause, make the smallest patch, and preserve existing behavior.
- Read the diff and rerun the focused test and the broader suite. Keep the patch and test output together for review.
Prompt to try
Reusable prompt
Run npm test and fix the failing cart rounding test. Preserve the public API and the passing behavior. Keep the existing tests intact. Return the patch and the final test output.
Check the result
The original test now passes, previously passing tests still pass, and the patch contains only changes relevant to the failure.