agentusecases.aiAll 2,007 use cases
Software & DevOps

Have Copilot write tests and rerun until they pass

A commenter set custom instructions so Copilot writes tests and reruns them until passing, needing three manual approval clicks.

Done withGHGitHub Copilot

What they did
A commenter said they used GitHub Copilot with custom instructions telling it that whenever it wrote tests, it should keep executing the tests until they passed. In their run, Copilot created a test, ran it, saw the failure, chose on its own to rerun with a "--info" flag to get more detail, then changed the code and ran the tests again; the human only had to approve each terminal run.
How it went
It eventually got the test passing in that example after three approved runs. The stated limitation was that Copilot still stopped for a human permission click before each terminal command.
Worth knowing
The practical catch was three manual approval clicks for terminal execution, even though the debugging loop itself was automatic.

Try it yourself with GitHub Copilot

Write tests for [file, function, or module] using [test framework]. Run them, and if any fail, fix the code or tests and rerun until the whole suite passes. Stop when everything is green and give me a short summary of what you changed and which tests you added. Pause and ask before running any command that installs packages or deletes files.

Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.

Read the original ↗

Source: Reddit · Undated

Related use cases

  • GH

    Run a solo company with eight agent departments

    A founder set up CEO, CFO, COO, lawyer, accountant, marketing, CTO, and improver agents that share memory and consult each other.

    GitHub Copilot

  • GH

    Build a full-stack project from scratch in Copilot agent mode

    The poster built a full-stack project with Copilot agent mode using Claude 3.7 Sonnet; it needed babysitting through setup problems but eventually produced styled, working React components.

    GitHub CopilotClaude

  • GH

    Break development work into phases for Copilot

    The poster splits work into phases with explicit tasks so Copilot's agent works through development steps instead of everything at once.

    GitHub Copilot

  • CL

    Build a C compiler with a team of parallel agents

    Anthropic's engineering write-up on tasking Opus 4.6 agent teams with building a C compiler.

    Claude

  • CR

    Upgrade site dependencies and frameworks with Cursor

    Kent C. Dodds had Cursor's agent look up migration docs, plan and upgrade Remix v2 to React Router v7 and xstate in his site.

    Cursor

  • CC

    Run Claude Code in an isolated VM that opens PRs

    The author runs Claude Code in a restricted VM with secrets served from Infisical. It can only create issues and PRs on Forgejo, and merges are manual before CI deploys.

    Claude Code

Keep browsing

All 29 GitHub Copilot use casesAll 358 Software & DevOps use cases

Get 5 like this every morning

The best things people got an AI agent to do, each with the prompt to try it.

All use casesAgentsTopicsJobsNewRSSAboutContactSponsorPrivacy
Sponsors
VCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor us
VCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor us