feat: work a backlog of items against the fleet - #205
Draft
outofcoffee wants to merge 5 commits into
Draft
Conversation
This was referenced Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work a file of work items against the fleet, at the pace the fleet allows.
Summary
tags(the operator's description of whatwork a node takes on) and the file may declare top-level
concurrencylimits — a
totaland per-tag ceilings on how much work is in flightGET /v1/fleetserves the fleet's topology behind the callertoken — every node's tags, state, and serving facts, the model a stopped
node would start with where the fleet wakes, and the file's wake,
ranking, and concurrency settings, each absent where the file declares
it not
spinloop orchestrator --gateway <address> --items <file>: reads thetopology from the gateway, admits backlog items within the fleet's limits
ranked by priority, and runs each admitted item as a one-shot agent
(opencode or Pi) whose inference goes through the gateway; each item's
state, its agent's output, and the file's lock are kept beside the items
file
and re-queues their items; an unclean death leaves items
runningand thenext run records them failed rather than working them twice
Applytakes asetDefaultModelflag, so a dispatch that namesits model itself leaves the harness's default model as it was
the gateway example, and docs: a feature guide for working the items file
plus the command reference
Implementation details
The orchestrator holds no fleet file and no node credentials — the gateway is
its only view of the fleet, and the only thing that can start a node. A
stopped node is offered to an item only where the fleet's wake policy allows,
and it is the gateway, for the item agent's first request, that does the
starting. This keeps the fleet file the single source of truth for the
topology and leaves waking where it already lives.
The items file's
idis an item's identity for life: the state beside thefile keeps one record per
id, so a finished item is never worked again —new work gets a new
id.