Coding tools now let several agents work on one job at the same time. Google’s Antigravity, for example, added /swarm, Orchestrator and Remote Agents: parallel agents in isolated workspaces, verifier agents that run tests and challenge diffs, and a planner model that hands work to a faster one. Whatever tool you use, the results depend on the briefs. The prompts below are our own; adapt the bracketed parts and test them on a small task first.
Quick answer: split the job into pieces that touch different files, give every agent the same definition of done (tests, lint, build), and give one agent the job of checking the others rather than writing code.
Before you start: is the job worth splitting?
Parallel agents help when the work is wide and repetitive: renaming an API across 40 files, migrating tests to a new framework, updating dependencies package by package. They help less when the work is deep and tangled, such as a single tricky bug, where one careful agent beats five busy ones. A useful test: if two people could do the pieces without talking to each other, agents probably can too.
You also need a fast way to check the work. Google’s advice in its Antigravity interview is to make codebases easy for agents to verify: fast, deterministic tests, clean lint and compiler signals, and isolated test environments. If your tests take an hour or fail at random, fix that first.
1. The planner brief
Ask one strong model to plan before anyone edits.
You are planning a change for a team of parallel coding agents. Do not edit any files.
Goal: [describe the change, e.g. "replace the old logger with the new logging module everywhere"].
Repository notes: [language, build command, test command, lint command].
Produce:
1. A list of work items. Each item must touch a set of files that no other item touches. List the files.
2. For each item: the exact change, the tests that prove it works, and anything the agent must not change.
3. Shared rules every agent must follow (naming, imports, error handling).
4. Items that must happen in order, and why.
5. Risks: places where items might conflict, and how to avoid them.
If the goal is unclear or cannot be split safely, say so and ask me questions instead of guessing.
2. The worker brief
Give each worker only its own piece, plus the shared rules.
You are one of several agents working in parallel. Your piece of the work:
[paste one work item from the plan, including its file list].
Shared rules: [paste the shared rules].
Only edit the files listed above. If you find you need to change another file, stop and report it instead of editing it.
Definition of done: [build command] passes, [test command] passes, [lint command] shows no new warnings.
When you finish, report: files changed, what you changed and why, test results, and anything you were unsure about.
Do not change tests to make them pass unless the plan says the test itself is wrong.
The two lines that save the most time are “stop and report” for out-of-scope files and “do not change tests to make them pass”.
3. The verifier brief
The verifier reviews instead of writing code, and is told to look for problems, not to approve.
You are the verifier. Do not write new features. Review each agent's changes against the plan.
For each work item:
1. Run [test command] and [lint command]; report the results exactly.
2. Check the diff only touches the listed files.
3. Look for: behaviour changes the plan did not ask for, deleted or weakened tests, hard-coded values, missing error handling, secrets or credentials.
4. Give a verdict: accept, or send back with a numbered list of specific fixes.
Be strict. If you cannot run a check, say so; do not assume it passes.
4. The merge and summary prompt
All work items are accepted. Combine them and run the full test suite once more.
Then write a pull request description: what changed, why, how it was tested, anything reviewers should check by hand, and any follow-up work.
Keep it short enough that a reviewer can read it in two minutes.
5. Planner and fast-model hand-off
Some tools switch models inside one task: a slower, stronger model plans and checks, a faster one makes the edits (Google says its Orchestrator does this with Gemini 4 Carbon and Hydrogen). If your tool lets you choose, a hand-off note helps:
You planned this task. Hand the next step to a faster model.
Write a hand-off note of no more than 15 lines: the exact edit to make, the files, the test to run, and what to do if the test fails (try once more, then hand back to you with the error).
For how to pick thinking levels on the fast model, see Gemini 4 Hydrogen thinking levels.
6. Agents that run while you are away
Cloud agents can work in a virtual machine and leave you a pull request. Add a status line to the worker brief so you can check from your phone:
Every time you finish a step, write one line to the task log: step number, what you did, test status (pass/fail), and whether you are blocked.
If you are blocked for more than [N] attempts on the same error, stop and wait for me. Do not try unrelated fixes.
Rules worth writing down once
- What agents may do alone: read, edit their own files, run tests. What needs you: new dependencies, database migrations, anything that deploys or spends money. Never: touching secrets or production. Our agent permissions and approvals checklist has a full template.
- Reusable instructions: if you run the same kind of migration often, package the rules as an Agent Skill instead of pasting them each time.
- Keep a human review: read the final diff yourself before you merge, however good the verifier report looks.
Common mistakes
- Overlapping files. Two agents editing the same file is the main cause of conflicts. Fix the plan, not the merge.
- No shared definition of done. Each agent decides “finished” differently. Put the commands in every brief.
- Verifiers that only summarise. Tell the verifier to run the checks and to send work back.
- Too many agents. Start with two or three. More agents mean more review for you.
Related
- Choosing a tool? See our ranked best AI coding agents in 2026: Claude Code, Codex, Antigravity, Mistral Vibe and DeepSeek.
- How to prompt GPT-6.2 and which Claude 5.5 model to use, for other coding models.
- How to prompt AI to review long documents, the same review habits applied to text.
- Reusable AI prompt templates.
Contribute your creativity