Writing
Scaling agent work without scaling supervision
Delegating a feature to an agent should free you to work on something else. That only happens if the agent can build, test and revise it without repeatedly waiting for you or another task. Otherwise, parallel implementation leaves the developer coordinating every step.
The approach I’m using in my Unity game is to give a small number of agents substantial, independently testable work. Each task gets an owner, a working environment and acceptance checks. I can then playtest one feature, send it back for changes and continue developing while other tasks progress.
Unity made independent work share an environment
A shared Unity project gets in the way of that workflow. Agents editing different scripts still share working files, imported assets and Editor state. An unfinished change from one task can break compilation for another, and a playtest can include changes from several tasks at once.
Tests can run through the already-open Editor, but they still use that shared project state. While the project is open for development or playtesting, an agent cannot launch a separate batch-mode Unity test process against the same checkout: Unity blocks that second process from opening it.
Moving between tasks in that environment means coordinating which version is loaded, what can change and when it is safe to test. I built Unity Swarm so each task could have its own playable project and keep it through feedback and iteration. That lets several parts of the game advance without taking turns in the same working environment.
Define the work and its tests together
The first decision is where to draw the task boundary. A whole feature is useful when its owner can make implementation decisions and verify the result without constantly renegotiating another task’s work. Splitting every small change into a separate assignment creates more handoffs.
For task decomposition, I use research agents to draft the assignments. I review their proposed approach, assumptions and tests before implementation starts. Each assignment needs:
- A substantial, bounded result. A feature, system or distinct area of the game that can be tried on its own.
- Acceptance checks. Define expected behavior and failure cases, which automated tests will cover them, and what still needs an Editor check or human playtest.
- One owner through iteration. The owner implements the feature and its tests, returns reproducible results and handles follow-up changes.
For example, suppose one task owns an inventory feature and another owns enemy patrol behavior. The inventory owner can work in a small scene with item pickups. The patrol owner can use a separate scene with an enemy, a patrol route and the existing player controller. Neither needs the other’s unfinished feature to build or test its work.
The inventory assignment could require:
- Adding and removing items updates the contents and counts correctly.
- A full inventory rejects another item without losing it or changing existing contents.
- Saving and loading preserves the items and their counts.
The patrol assignment could require:
- The enemy follows its patrol points in order.
- Detecting the player switches the enemy from patrolling to chasing.
- Losing the player for a specified time returns the enemy to its patrol.
Those behaviors can have automated tests. HITL playtesting checks whether item selection feels right and the enemy’s reactions are understandable. While one feature is being reviewed, the other owner can keep implementing and testing in its own project.
As agents take on more implementation, specifying and validating behavior becomes a larger part of the programming work. Writing down these checks before delegating gives the agent a way to test its decisions and gives review something more useful than a claim that the feature is done.
Give each task a project it can keep
The agent working with me in the main project delegates each feature to a separate agent in its own Unity project. Each feature agent receives the goal, relevant context, interfaces it needs to use and acceptance checks. Its AITL implementation and testing loop can continue while I work in main or playtest another task.
Persistent Git worktrees provide project-state isolation, with separate project files and Unity Library caches for each task. Each can open its own Editor when needed. An agent’s edits affect only its task project, so its unfinished code cannot break another task’s compilation or change what I am playtesting elsewhere. Changes move between projects only through an explicit update or merge.
My orchestration prompt defines the assignments and each agent’s responsibilities. Swarm provides the persistent projects and tooling for testing, updates and integration. Python tooling creates and updates the separate projects. A C# bridge handles requests inside the corresponding Unity Editor and checks whether changes can be applied safely. The task project stays available through playtesting and revisions.
Make the handoffs explicit
Each task follows the same handoff:
Start from current saved work. Each task gets the latest saved project files without needing a commit first. Unsaved Editor changes are excluded.
Hand back a tested project. The agent returns a playable project, instructions for trying the feature, test results and anything still unverified.
Keep feedback in the same project. A feature may need a few iterations. Playtest it and talk through changes with the agent in that project, while other tasks keep progressing.
Test before merging. When a feature is ready, request integration. The agent brings the latest main changes into the task project and tests the combined result before applying it to main.
Integration preserves main’s commit and staged changes, and the task project stays available for further work.
Where this saves time
- Reviewing one feature does not pause the others. While one feature is being playtested or revised, other agents keep implementing and testing in their own projects.
- Feedback continues in the same playable project. Implementation decisions, test results and feedback stay with the assigned agent. Separate agent conversations provide context isolation, so updates from other features do not flood the owner’s context. The retained project and handoff let each agent resume its own task through revisions.
- New tasks start from work already saved. Swarm captures main’s current saved files, including uncommitted changes. I can start a task immediately without staging or committing main’s changes first.
Where it still costs time
- More Swarms require more compute. Each Unity Editor needs substantial memory and compute, so your machine may only support a few Swarms at once. That limits how much work you can parallelize and how much time you can save.
- Acceptance and integration. Tests do not decide whether a feature belongs in the game. Playtesting still takes attention. During integration, edits pause in main and the task project while the combined version is checked.
The repository includes the setup instructions, coordination skill and regression tests for state preservation, stale results and interrupted operations. Those tests use simulated Editor responses. A runnable two-task example exercises capture, validation and integration with real Git and Python checks while Unity stays closed.