{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "scgopi-graphcode--goal-based-agent-loop-until-tests-pass",
 "repo": "scgopi/GraphCode",
 "repo_url": "https://github.com/scgopi/GraphCode",
 "repo_slug": "scgopi-graphcode",
 "title": "Run an agent loop until your tests pass",
 "page_title": "How to run an agent loop until your tests pass with Graph Code",
 "summary": "Create a goal-based loop in Graph Code with a shell predicate, such as make test, so the agent keeps working until the check exits 0.",
 "who": "A developer with a failing build or test suite who wants the agent to keep going without being re-prompted each time.",
 "problem": "Agents often stop early and declare victory, so you check, find failures and prompt them again by hand.",
 "outcome": "A loop that only finishes when your own done check passes, with the live session open to attach to if it goes off track.",
 "steps": [
  "Install Graph Code with `brew install --cask scgopi/graphcode/graphcode` and add your project",
  "Create a loop and choose the Goal-based type",
  "Write the task, for example fix the build",
  "Set the done check to a shell predicate such as make test",
  "Press Test on the done check to run it exactly as the daemon will",
  "Start the loop; attach to its terminal if you want to correct it mid-run"
 ],
 "agent_prompt": "Create a GraphCode goal-based loop on <agent> for this repo with the prompt <fix the failing tests in module X without changing test files> and the done check <make test>. Tell me how to test the check before starting.",
 "agents": [
  "claude-code",
  "codex"
 ],
 "difficulty": "Beginner",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "Pick a done check that can actually succeed, or the loop keeps running.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "swift",
 "requirements": [
  "macOS",
  "At least one CLI coding agent installed"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/scgopi-graphcode/goal-based-agent-loop-until-tests-pass/",
 "md": "https://dedupedai.com/use-cases/scgopi-graphcode/goal-based-agent-loop-until-tests-pass/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/scgopi-graphcode--goal-based-agent-loop-until-tests-pass.json",
 "api_version": "v1"
}
