Agents and workspaces
Several agents in the same folder
The radar that keeps two agents from stepping on each other on the same file, warns when a command rewrites another agent's work and when a changed signature breaks the code of whoever uses it, even on another branch.
Several agents in the same folder work faster, but they can step on each other's toes. Gloop's radar notices before it happens, or right after. If you'd rather avoid it altogether, give each agent its own branch: see Branches, worktrees and try in parallel.
Two agents on the same file
An agent holds a file from its first edit until the end of its turn. If another agent wants to touch it meanwhile:
- if it only wants to read it, it waits quietly for the first one to end its turn, so it reads the whole, up-to-date file;
- if it wants to edit it, Gloop asks you who goes first (with a notification too). The one waiting, when its turn comes, receives the other's changes and redoes its own on top, instead of wiping them out.
On the Control map a wait is a dotted line from the one waiting to the one holding the file, and the waiting agent's card says "waiting for invoice.ts".
A command that rewrites a file
A shell command (a formatter, a script) can change dozens of files in one go, including those another agent is editing. Gloop takes a snapshot of the folder before and after every command of an agent: if the command rewrote a file another agent holds, a warning appears above that agent's terminal, with the command, who ran it and which files.
- Tell the agent tells it to re-read the files before its next edit (queued if it's working);
- See the changes opens Changes;
- Ignore closes the warning.
It's a warning after the fact, never a block.

The contract radar
Sometimes two agents don't touch the same file, but one changes something the other's work depends on: a function that now wants one more argument, a renamed method, a column dropped from the database, a test data file. The other's code will break, but nobody notices until it runs.
The contract radar notices: after every edit it checks whether a signature other files can use has changed, and looks for who uses it the old way.
- In the same folder it looks at the files the other agents are working on. The warning appears above the affected agent's terminal: the signature before and after and where it's used. Tell sends all this to it as a message, Ignore closes it.
- In another worktree (another branch of the same repository) it looks at its whole branch, including work not committed yet. The warning says it breaks on merge, with three choices: Take the change (the agent brings the other's work into its branch and adapts), Merge order (Gloop remembers which branch to merge first and reminds you in the Changes of the second one), Ignore.

The warnings also show in Control: on the map an orange dotted line from the affected agent to the one that changed it ("uses vat(), changed by VAT split"), long dashes when the break is on merge; the warning cards sit at the top right. A new warning also arrives as a system notification, if Gloop isn't in front.

What counts as a contract
So as not to warn you for nothing, the radar is cautious:
- only what other files can see counts (exported, public);
- a signature only really changes if how many arguments it takes changes, or if the name disappears or changes. A type changed on its own doesn't count: the compiler says it better;
- a user only counts if it calls it in a way that no longer works with the new signature;
- names that are too common (
render,create…) aren't followed.
Languages read: TypeScript and JavaScript, C#, Python, Go, SQL (tables and columns dropped or renamed, migrations included) and test data files.
When an agent makes a commit (or a script moves the branch), the radar checks the changes of the last 24 hours again: whoever has adapted in the meantime loses the warning.