DEV Community

chovy
chovy

Posted on Originally published at dev.profullstack.com

OpenFleet: the record of who spawned an agent, and the human who answers for it

This morning a Claude Code background job on our dev box asked moshcode to split a task across two agents. One worker became another background job. The other became a tmux pane. Each did its piece. Neither could say who had started it, why, who its sibling was, what its budget was, or which human had approved any of it. Both ran with their approval prompts bypassed, because the agent that spawned them chose to. The human could not see the tree or stop the pair as one thing.

Nothing was hidden on purpose. Claude Code lists background sessions flat. moshcode lists herd panes flat. Neither reads the other's roster, and the only durable trace of the swarm was that one worker's working directory happened to sit under the parent's temp folder. The relationship lived in a process tree and in a prompt, and was recorded nowhere.

OpenFleet is that record, written by the worker that had to reconstruct its own parentage by hand. It is live at logicsrc.com/openfleet, with the specification at logicsrc.com/docs/openfleet.

Two words, kept apart

A fleet is every agent session one human, its sysop, is answerable for. Fleets are always human controlled. Only the sysop's verbs open a fleet or set its ceiling, every ledger line that does so is marked sysop, and no agent is ever a sysop.

A swarm is the set of sessions one spawner starts inside a fleet to do one task. Swarms are automated by default. An agent starts one, and the record and the ledger are what let the human see the tree, stop the swarm as one unit, and learn afterwards what the agent did.

Not to be confused with OpenSwarm, our peer-to-peer media family, whose swarm is a BitTorrent swarm of peers serving pieces of a file.

The record

One JSON file per session, written before the session starts and never changed after. It says which fleet and which human, who spawned this member and for what task, which paths this member alone may write, how deep it sits, which engine runs it, whether its approval prompts stand or are bypassed, and the ceiling it was started under: approvals, budget, depth, fan-out, hosts, deadline.

A session cannot tell by comparing ids whether a record was written for it or inherited from a parent, because the record often exists before the engine has minted any id. It tells by the ledger. A record with no start line is unclaimed, and the first session under it claims it. A session that inherits an already claimed record derives a child record first, so an environment leak becomes a parent pointer instead of an impostor.

The ledger

One append-only file per fleet per host. Eight events: a fleet opened, a ceiling set, a swarm spawned, a member started, spent, ended, a swarm ended, a start refused. Every line says whether the human or an agent did it. A refused start names the ceiling key it broke, which is how a sysop finds out what an agent tried.

Five verbs

open and cap belong to the sysop alone; a process that carries a member id is an agent and is refused. tree draws the fleet from the ledger and the records. stop ends a member, a swarm, or a whole fleet as one unit, through each member's own engine. log says what happened and who did it.

None of it ships yet. The spec names what Claude Code, moshcode and a logicsrc fleet tool would each add, from what they record today.

What else moved

A second spec called OpenFleet had shipped the same morning from a parallel session: a published listing of agents and file swarms for rent through CoinPay. That one is now OpenRental, in the catalogs family, and its schema, validator and SDK exports moved with it in @logicsrc/schemas, @logicsrc/validators and @logicsrc/sdk 0.2.0.

Top comments (0)