Forking

An agent forks when it needs to work on something separate, without risking what it already has. A fork makes a child agent that handles the new work on its own.

A child is a copy

A fork gives the child a full copy of the parent's conversation, so the child starts out knowing what the parent knew. It also gives the child its own branch: a private copy of the files that it can change without touching the parent's. The parent's conversation and files stay exactly as they were until the child merges back.

Agents form a tree

A child can fork children of its own, so agents grow into a tree. Each agent keeps its own name and its own branch, and both stay the same shape however deep the tree goes. The shape of the tree โ€” who forked from whom โ€” is recorded in the database, which is what the system reads whenever it needs an agent's parent.

Merging back

When the child's work is good, it merges back into the parent. All of the child's steps fold into one entry on the parent's branch, and the child shuts down. The child's full history is kept aside, not deleted. A merge changes the parent's real work, so it waits for a human's OK first. Once approved, the merge lands and the child ends.