# AI use cases for Graph Code (scgopi/GraphCode)

Repo: [scgopi/GraphCode](https://github.com/scgopi/GraphCode) | Use cases: 3 | Page: https://dedupedai.com/use-cases/scgopi-graphcode/

GraphCode is a macOS app for graph engineering: running many connected CLI coding agent sessions (Claude Code, Copilot CLI, Codex, OpenCode or pi) as nodes with hand-offs, while you can attach and correct any of them mid-run.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run several coding agents as one connected graph: https://dedupedai.com/use-cases/scgopi-graphcode/run-ten-agent-sessions-as-a-graph/
- Run an agent loop until your tests pass: https://dedupedai.com/use-cases/scgopi-graphcode/goal-based-agent-loop-until-tests-pass/
- Review an agent refactor step by step: https://dedupedai.com/use-cases/scgopi-graphcode/review-each-turn-of-a-refactor/

## How to run several coding agents as one connected graph with Graph Code

Repo: [scgopi/GraphCode](https://github.com/scgopi/GraphCode) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Use Graph Code on a Mac to run Claude Code, Codex, Copilot CLI, OpenCode or pi sessions as loop nodes on a canvas, connected by hand-off, message or spawn edges.

**Who it is for:** A developer juggling many agent sessions at once, for example planning, coding and review agents on the same project.

**The problem:** A dozen terminal tabs of agents means losing track of which one is waiting, and passing work between them by copy and paste.

**The outcome:** A canvas of live agent sessions that hand work to each other, survive app restarts and reboots, and let you attach to any one to correct it.

### Steps

1. Install on macOS 15 or newer on Apple Silicon: `brew install --cask scgopi/graphcode/graphcode`
2. Make sure at least one agent CLI is on your PATH: claude, copilot, codex, opencode or pi
3. Add a project from the sidebar: a local folder, a clone from a URL or a remote repo over SSH
4. Create loop nodes on the canvas, each with its prompt and the agent it runs as
5. Drag between nodes to connect them; an edge is a hand-off by default, or a message or spawn
6. Click a node to attach to its live terminal, and use the shortcut to walk loops that are asking for you

### Prompt to paste into your agent

```text
Help me plan a GraphCode graph for <feature>: a planning loop on Claude Code, an implementation loop on Codex and a review loop, with hand-off edges between them. Write each loop's prompt and its stop condition.
```

### Caveat

Graph Code bundles no agents; it launches your installed CLIs with your own accounts.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/scgopi-graphcode/run-ten-agent-sessions-as-a-graph/

## How to run an agent loop until your tests pass with Graph Code

Repo: [scgopi/GraphCode](https://github.com/scgopi/GraphCode) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

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 it is for:** A developer with a failing build or test suite who wants the agent to keep going without being re-prompted each time.

**The problem:** Agents often stop early and declare victory, so you check, find failures and prompt them again by hand.

**The 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

1. Install Graph Code with `brew install --cask scgopi/graphcode/graphcode` and add your project
2. Create a loop and choose the Goal-based type
3. Write the task, for example fix the build
4. Set the done check to a shell predicate such as make test
5. Press Test on the done check to run it exactly as the daemon will
6. Start the loop; attach to its terminal if you want to correct it mid-run

### Prompt to paste into your agent

```text
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.
```

### Caveat

Pick a done check that can actually succeed, or the loop keeps running.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/scgopi-graphcode/goal-based-agent-loop-until-tests-pass/

## How to review an agent refactor step by step with Graph Code

Repo: [scgopi/GraphCode](https://github.com/scgopi/GraphCode) | Difficulty: Beginner | Time: 30 minutes | Basis: From the README

Use a turn-based Graph Code loop so the agent pauses after every turn inside its session and waits for your review before it continues.

**Who it is for:** A developer doing a risky refactor who wants agent speed but a human check at every step.

**The problem:** Letting an agent refactor unattended can produce a huge diff you cannot review; prompting it step by step by hand is slow.

**The outcome:** A refactor done in reviewed increments, in a live session you can steer, that ends only when you end it.

### Steps

1. Install Graph Code and add the project
2. Create a loop and choose Turn-based, which hands off the check to you
3. Write the refactor goal and the order you want it done in
4. When the loop pauses, open its terminal workspace and review the turn's changes
5. Correct it in the session or let it continue
6. End the loop yourself once the refactor is complete

### Prompt to paste into your agent

```text
Set up a GraphCode turn-based loop for this refactor: <describe it>. Break it into small steps, one per turn, and after each turn summarise the files changed and the tests run so I can approve the next step.
```

### Caveat

Requires macOS 15 or newer on Apple Silicon. Building from source needs zig; the DMG or Homebrew is simpler.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/scgopi-graphcode/review-each-turn-of-a-refactor/
