- It upgrades the CLI from the source that you installed it from: PyPI (the latest release), the GitHub repo (the
latest
main), or a local checkout. It prints the version before and after. - It runs
piloop install-skillsfrom the new code, so the skills of every harness on yourPATHmatch the new CLI. - It restarts a running daemon in place, as
piloop restartdoes. The running agents continue, and the new code migrates the database as it starts. First it checks that the new daemon starts (piloop serve --check): when it would not, the upgrade stops with the reason and the old daemon keeps running. When no daemon runs, the upgrade migrates the database itself. - It runs
piloop doctor. When a check fails, the upgrade exits with a non-zero status.
piloop --version prints the version, and the commit for an install from the GitHub repo. A checkout that you
installed with uv sync is not a uv tool: upgrade it with git pull.
Upgrade one release at a time
Upgrade through every minor release in order: 0.4 to 0.5, then 0.5 to 0.6, then 0.6 to 0.7, then 0.7 to 0.8. Each release migrates a database only from the newest schema of the minor release before it, or from a newer one. On an older database, every command names the release that it is from, and the release to install first. It changes nothing:uv tool install piloop drops the pin. Quote the requirement: * is
a glob in zsh.
This page covers the upgrades to the next release, 0.8.0, 0.7.0 and 0.6.0. For an earlier one, follow the guide of the release that you upgrade to:
0.5.0,
0.4.0,
0.3.1 or
0.2.1.
Who upgrades during a campaign
The runs after an upgrade are scored by the new code. So the orchestrator does not upgrade by itself: whenpiloop doctor reports a newer piloop, it asks you in the inbox. Set PILOOP_AUTO_UPGRADE=1 in its environment to let
it upgrade and record the decision instead.
Check the install
piloop doctor is read-only. It checks:
- Whether the source that you installed from has a newer piloop. An install pinned to a version is not checked.
- The daemon runs the installed code, and the database has the current schema.
- The providers that packages add load, and none of them reuses a name.
- The
piloop.tomlof every campaign loads, and the secrets that its MCP servers and harnesses need are set. - Every harness on your
PATHhas the skills of this CLI. - What each provider in use checks itself, such as the harness CLIs on your
PATHand git 2.40 or later.
PILOOP_DEBUG=1 to see the full traceback of an unexpected error.
The database
piloop migrate, piloop upgrade, and piloop serve when the daemon starts, migrate the database to the schema of
their piloop. Every other command opens the database only at the schema that it knows. Otherwise it changes nothing,
and says what to run:
- The database is older, and no daemon runs: run
piloop migrate. - The database is older, and a daemon runs: run
piloop restart, which migrates it on this piloop. - A newer piloop, or one built from another branch, migrated it: install that piloop.
piloop migrate and piloop serve do not migrate, because that daemon would
break on the new schema.
Before it migrates, piloop writes a copy of the database next to it:
$PILOOP_HOME/piloop.db.bak-<revision>-<UTC time>, such as piloop.db.bak-0001-20261021T002254Z. It keeps the 3
newest copies: migration_backups in config.toml sets how many, and 0 writes none. When the copy cannot be written,
nothing is migrated.
Restore from the backup
A backup brings the database back to the moment before the migration. What piloop wrote after it is lost. The git commits and the workspace files stay.-
Stop the daemon:
piloop stop. - Install the piloop that the backup’s revision belongs to. A newer one would migrate the copy again.
-
Put the copy in place of the database, and remove its
-waland-shmfiles: -
Start the daemon,
piloop serve --detach, and check withpiloop doctor.
Follow main
To followmain instead of the releases, install piloop from the repo. From then on, piloop upgrade installs the
latest main, and a release opens the database again only once it knows the schema that main gave it.
Deprecated configuration keys
A renamed or removed key ofpiloop.toml keeps working for at least one minor release. Each use shows a
PiloopDeprecationWarning with the file, the line, the new key and the release that removes the old one. The
configuration reference and the
changelog list them.
What is stable
Before 1.0, a minor release may break these, and the changelog says so:- The
piloopCLI: its commands and their flags. - The keys of
piloop.toml. - The contract of the evaluate command.
- The database schema, as
piloop sqlshows it.
piloop.capabilities is the stable plugin API. Other piloop.* imports can change in any release.
Upgrading to the next release
The best rule judges against the best
The best of a track is the last candidate that the best rule kept, in the order in which the candidates became ready. The tablejudgements stores each answer of the rule. The migration adds it empty, and the daemon’s first pass asks
the rule for each case, also on a stopped campaign: run piloop restart after the upgrade. With the default rule, the
best stays the same, but on an exact tie of the mean, where the candidate that became ready first wins.
- A plugin’s best rule defines
judge(case) -> Keep | Refuse | Unansweredin place ofrefuse(case) -> str | None. A rule that defines onlyrefuseworks, with aPiloopDeprecationWarning, until 0.10.0. Casehas the track, every metric, the best that the candidate would replace (incumbent) and the parent. Each side has its id, its parent, and every sample with its per-unit results.
A run claims any number of ideas
A run may claim ideas, and propose its own, as many times as its implementer wants. The tablerun_claims (run_id,
idea_id, attempt, claimed_at) holds the claims, and replaces runs.idea_id and runs.attempt. The migration
moves each run’s claim there, and a downgrade refuses a database where a run claimed more than one idea.
-
A query that joined a run to its idea joins its claims:
-
The table
submissions(run_id,candidate_id,idea_id,event_id,submitted_at) holds each submission, for the claim that it was for, with itsrun.submittedevent. Join an idea to what was submitted for it through it: one candidate may be submitted for several ideas, by several runs. What settles a claim, what waits for a score and what a worker hears all read it.candidates.idea_idnames the claim that a candidate was made for, or last submitted for. -
piloop submit --idea <id>names the claim that a version is for. By default it is the run’s newest claim. -
--baseofpiloop idea claimandpiloop idea proposeworks only before the run’s first submission. -
When the run ends and its submissions have their scores, each claim settles on its own: its idea is
doneonce a submission for it has a score, whatever the run’s end, andopenagain otherwise. -
A plugin’s campaign type:
CampaignType.settle(s, claim, end, submissions)settles one claim, with the run’s submissions for its idea, in place ofsettle(s, run, end, last). -
persistent = trueon a role that does runs keeps each implementer working until itstimeout: it claims, asks for or proposes ideas as it wants, and the next run of its slot starts from the best. It is off by default.
Upgrading to 0.8.0
Upgrade from 0.7
0.8.0 migrates a database from 0.7’s heads or newer: a 0.6 home upgrades through 0.7 first, as Upgrade one release at a time says.- The upgrade rebuilds the tables whose ids leave the database (events, comments, runs, candidates, ideas and measurements) so that an id is never used again. Its time grows with those tables: on a small home it takes under a second.
- It copies each measurement’s per-unit results from
<home>/unitsinto the CAS, and the server’s owner id from<home>/ownerinto the database. It leaves both, which nothing reads any more: delete them once you will not go back to 0.7. - On Linux, the upgraded daemon serves its API from processes beside it:
[daemon] api_processes = "auto", half the cores up to 8, about 130 MB each. The count follows the daemon’s CPU affinity, not a container’s CPU limit: in a container, setapi_processesto what its limit allows. Setapi_processes = 0inconfig.tomlto serve from the daemon alone, as 0.7 did. With[plugins.executor] relayed_callsbelow that count, the daemon does not start, and says which key to set.
Infrastructure failures count per task
A submission may carry a one-lineTASK file at its root. [evaluation] stop_after_tries failures in a row for one
task hold only that task’s evaluations, and piloop candidate remeasure on one of its candidates releases them.
Submissions without a TASK file share one count, and at the limit the whole campaign pauses, where 0.7 paused only its
measurements: piloop resume starts it again.
piloop sql has limits
A statement that runs longer than [sql] statement_seconds (5 s by default, in config.toml) is interrupted and
changes nothing. A wait for the write lock does not count. Raise the limit for a long report.
A plugin
- A provider’s routes come from
Serves.routes(host) -> Routes, which each process that serves the API calls.Contribution.routeris gone,LineageProvider.contributionisLineageProvider.routes, andExecutor.configureis gone: the leases read the live limits of the pools themselves. - A network binds in
Network.bind()and serves on the bound socket inNetwork.listener(sock). - A VCS provider implements
Repository.merge(ours, theirs, summary), which theaccumulatingtype calls. - A CAS provider may answer
shared(): whether every host that serves the home reaches its blobs.
The keys that 0.7 deprecated are removed
The keys that 0.7 deprecated now fail. One line names each key, the line of the file that sets it and what to do, such asconfig.toml:3: delete [agents] wake_budget: piloop 0.8.0 removed it. Delete them from each piloop.toml and from
config.toml; piloop doctor names each one. Delete [agents] wake_budget from config.toml before you upgrade: no
command but piloop --version runs with it, so piloop upgrade stops and the old daemon keeps running. The database’s copies need nothing: 0.7’s revisions already took these keys out of them.
Upgrading to 0.7.0
Upgrade from 0.6
0.7.0 migrates a database from 0.6’s heads or newer: a 0.5 home upgrades through 0.6 first, as Upgrade one release at a time says. The upgrade rewrites the copy of eachpiloop.toml that the database stores: it takes out every key in the tables below, and a campaign that scored at run
end scores what its implementers submit.
Removed keys
The keys that 0.5 and 0.6 deprecated now fail as unknown keys, with a link to the configuration reference. Delete them from eachpiloop.toml and from config.toml, or write them as this table says:
[evaluator] scoring loaded with a warning in 0.7 and did nothing: 0.8.0 removes it
(Upgrading to 0.8.0).
Run-end scoring is removed
piloop scores only what an implementer submits (piloop submit). Each other version of a run is a skipped
candidate, never measured. [evaluator] scoring = "run_end", which 0.6 kept for the campaigns that 0.5 stored, is
gone, and so is the key: delete scoring from [evaluator]. piloop no longer reads the Piloop-Eval: skip and
Piloop-Note trailers of a commit: a commit that is not submitted is never measured, and a note goes on the board as
a note comment.
The evaluate command reports a status
The result line of the evaluate command must carrystatus, and the
primary metric as score. 0.6 still took 0.5’s line; 0.7 refuses it as a bad result, which is a crash:
A rung of the ladder still reports its metrics alone.
The API and the CLI
- An inbox item and a comment show
acks, one for each party that acknowledged it.acked_atandacked_byare gone: read the ack of thehumanparty, or of your role. piloop submittakes no--wait: it returns at once, as in 0.6. A worker’s relay from before 0.6 passed it.
A plugin
Surface.SWEEPis gone: writeSurface.ORCHESTRATOR.- A vcs provider’s
Versionhas noskipand nonotes, and the prompts have no{vcs:mark}part.
The orchestrator role is removed
piloop launches no orchestrator of its own. Every escalation reaches your notifiers at once, and the coding agent that you talk to is the orchestrator, with thepiloop-operate skill. A plugin can still add a
role that starts its own agents (Roles). Its keys are in
Removed keys: [plugins.role.orchestrator], [plugins.escalation] grace,
[evaluation] wake_after_tries of config.toml, and the incidents, reported and research_commands sections.
piloop inbox wait and GET /v1/inbox/news no longer return news of kind anomaly_requested.
An escalation takes one answer
Each party, such as the people or the orchestrator, acknowledges an inbox item for itself. The tableacks holds one
row for each party that acknowledged an item, and replaces comments.acked_at and comments.acked_by. A piloop sql
query on those columns fails: read acks. The API shows acks too: see The API and the CLI.
- An answer takes an item out of every inbox. An escalation takes one answer: a second one is refused, with the first.
- An orchestrator’s ack no longer stops a notifier: it sends what no person acknowledged.
Research memory is removed
The lessons, the documents and the orchestrator’s journal are gone. The orchestrator keeps its notes in the event stream instead: anote comment on the campaign, which the piloop-operate skill reads back when a session starts.
- The migration drops the
lessons,documents,documents_ftsandjournaltables with their rows, and archives nothing. The backup that the upgrade writes first still has them: copy out what you need before you upgrade. piloop wake,piloop journalandPOST /v1/campaigns/{campaign}/journalare removed. The answers ofPOST /v1/campaignsandPOST /v1/campaigns/{campaign}/syncno longer havedocuments.- The
lessonssection, the SQL functionblake3()and the memory capability (MEMORY,MemoryProvider,LocalMemoryandSyncedinpiloop.capabilities) are removed.
[plugins.memory], the lessons section and [agents] wake_budget of config.toml, loaded with a warning
in 0.7 and did nothing: 0.8.0 removes them (Upgrading to 0.8.0).
A cancel stands, and keeps the origin
piloop eval cancel no longer makes a run’s candidate skipped. It keeps its origin, and stays in the pool of every
evaluator that scored it. The cancel stands under the evaluator that it cancelled: the daemon does not confirm the
candidate, score it on the sealed split, or measure it again as the baseline or the best before an evaluator change.
piloop candidate remeasure asks for it again. The table cancels holds each cancel. The migration gives each
candidate that 0.6.0 made skipped for a cancel its origin back.
A remeasure gets the evaluations that it asks for
piloop candidate remeasure --repeats 5 gets 5 evaluations of its own. An evaluation of the candidate that ran when
you asked, or piloop measurement add, no longer ends the request: the candidate’s mean includes it, and the request
waits for its own evaluations. The column evaluations.ask names the request that an evaluation is for.
A full disk while piloop stores a campaign’s linked inputs is no longer the candidate’s crash. It is an infra error, as
in the evaluate command: the evaluation runs again after [evaluation] infra_retry, and after stop_after_tries
failures in a row for the same committed TASK ID, that task’s evaluations pause. Retry the task with
piloop candidate remeasure <id>. Submissions without a task ID share one count and pause the entire campaign at
the same limit. A tagged campaign also pauses when all tasks in its registered TASKS.txt are held, or when an
inventory fact source reports available_eval_images = 0. Restore an eligible evaluation, then run piloop resume <campaign>.
An agent that took a few turns worked
An agent whose harness counted more than[agents] startup_turns turns (3 by default) worked, however soon it ended.
It is not never_worked, and its run is an attempt. Below that number, startup_seconds decides as before.
An agent’s deadline and token
agent_sessions.deadlineis when its timeout ends the agent, stored at its launch. The agents that run at the upgrade have none: they get no wrap-up message before their timeout.- An agent’s token ends with its session. The migration deletes the tokens of the agents that ended.
- A stop or a cancel ends a starting agent at once. The id of a deleted agent session is never used again.
The database refuses impossible rows
New CHECKs refuse apiloop sql write that leaves a row in an impossible state. The migration repairs the rows that
an earlier write broke, and logs how many:
Upgrading to 0.6.0
Upgrade from 0.5
0.6.0 migrates a database from 0.5’s heads or newer: a 0.4 home upgrades through 0.5 first, as Upgrade one release at a time says.Removed keys
The keys that 0.5 moved now fail as unknown keys. Write them as the 0.5 notes say:
A campaign that 0.4 stored, and that no
piloop init stored again since, gets no notifiers from config.toml: run
piloop init on it to store its notifiers.
Removed features
Their keys still load, with a warning, until 0.7.0, and do nothing. What they wrote stays in the database.
A package’s own role, trigger or section of one of these names keeps its table and its keys.
A plugin’s role
piloop.capabilities no longer has SweepRole, Sweep or Files, and a role has no ideas_line or refuses_idea.
A plugin’s role is a subclass of ImplementerRole, which does runs, or of StartsItsAgents, which decides when its
agents start: it answers each pass over a campaign with its requests (request), says whether it wakes while the
campaign is paused, held or stopped (wakes_while), and launches its agents (launch). Quiet comes
from piloop.capabilities.
The board
An idea isopen, claimed, done or dropped. The migration renames each status:
piloop idea statustakesopenordropped. Only a run makes an ideadone.piloop idea seedandpiloop idea developare removed: usepiloop idea add. Its--family,--proposedand--supersedesare removed.piloop idea linktakes onlyafter. Anafterlink holds an idea until its prerequisite isdoneordropped.idea: <title>in a notifier’s thread adds an open idea. A notifier plugin answers it withAddIdea, notFileSeed.
Claims
The daemon gives no idea to a run. For each free slot it starts a run from the best, and the implementer claims one open idea (piloop idea claim), or proposes one and claims it (piloop idea propose). The idea is done after a
finished run whose last candidate has a score, and open again otherwise.
- A run’s
idea_idandattemptare null until its implementer claims an idea. piloop idea base, and--harnessand--baseofpiloop idea add, are removed. The migration deletesideas.base_candidate_id,ideas.harnessandideas.max_runs. A run starts from the best, or from the candidate that--baseofpiloop idea claimorpiloop idea proposenames.[tracks.<name>] shareis removed: workers claim any open idea.
Run ends and messages
An implementer’s clean exit ends its run:finished when it submitted a version, gave_up otherwise.
piloop run end submitted or piloop run end gave_up ends it before the session exits.
- The
findingkind is removed: a worker reports in anoteon its idea. Old findings stay readable. - No kind of comment does anything when it is written: the migration deletes
comment_kinds.after_end. finding_graceisend_grace. The migration renames it in each stored config.- An escalation holds no run: the migration makes each
awaiting_answerrunfailed. - Only a
messagereaches a running agent, on the agent, its run or its idea. Every harness hears it at its nextpiloopcommand. Anotestays on the board. - A plugin that names
escalationordecisionimportsESCALATIONandDECISIONfrompiloop.plugins.escalation.kit.kinds, not fromCommentKind.
An agent that never worked ends never_worked
An agent whose job did not start, or that ended within startup_seconds and left nothing, ends never_worked, not
exited or killed. After 0.6.0, an agent that took more than startup_turns turns worked: see
An agent that took a few turns worked. Its error says why, also when it exited 0. A query that counts ended agents with
state IN ('exited', 'killed') adds 'never_worked'. Rows that ended before the upgrade keep their state.
- A wrap-up no longer hides such an end: an implementer told to wrap up as it starts, that leaves nothing, never worked, and its run is no attempt.
- A run is queued again after a failed start only when its campaign would launch it now. While the startup breaker
holds, within the wrap-up lead, or while the campaign is paused, the run ends
not_startedat once and frees its slot. - When launches resume, the daemon acknowledges the startup breaker’s escalation.
The evaluate command reports a status and a score
A line without
status still reads as ok, with the primary among metrics, until 0.7.0.
Implementers submit
A campaign that 0.5 made keeps 0.5’s values in its stored config.
piloop campaign sync or piloop init reads its
piloop.toml again, and gives it the 0.6 defaults. To keep 0.5’s noise runs, put them in piloop.toml
(0.7.0 removes run-end scoring):
piloop submit returns at once
piloop submit prints the candidate and returns. Where it stands reaches the implementer as a [piloop] message.
--wait is ignored until 0.7.0. The route GET /v1/submissions/{candidate} is removed: read
GET /v1/candidates/{candidate}. [agents] relay_wait and relay_deadline of config.toml are dropped with a
warning.
The pool replaces verdicts
piloop scores every candidate into the campaign’s pool, and the best is a query. There is no verdict, head, bar, trunk or rebase.[plugins.verdict_rule],[[metrics]] repeatsand a role’sfollow_headare dropped with a warning. A best rule,[plugins.best_rule], says which confirmed candidate may be the best.- A guardrail’s
marginandfractioncompare with the baseline’s value. - The section
judgingisscoring. candidates.verdict,cause,verdict_by,verdict_reasonandtrack, andmeasurements.pair_id, are deleted. Each verdict stays in acandidate.verdictevent.candidates.excluded_reasonandexcluded_byare new.piloop candidate verdictis removed: usepiloop candidate exclude <id> --reason "<why>".piloop candidate remeasurenever refuses: the mean includes the new evaluations, and the best follows.
optimization source are renamed:
The API changes so:
A plugin imports
BestRule, Case, Scores, Criterion and Baseline from piloop.capabilities. VerdictRule,
Judgement, Outcome, Node, Trunk, Imported, Rebase, Noise, Bootstrap and Bar are removed. The events
candidate.judged, candidate.rebased, candidate.noted, candidate.rejudge_requested, candidate.rejudge_failed,
run.verdict_told, run.head_replaced and candidate.verdict are retired. The new ones are candidate.scored,
run.score_told, run.base_chosen and candidate.excluded_reason.
A cancelled evaluation records nothing
piloop eval cancel records no measurement. In 0.6.0, a run’s candidate is skipped, not a crash. After 0.6.0 it
keeps its origin: see A cancel stands, and keeps the origin.
The implementer’s brief is shorter
The implementer’s brief no longer shows thequeue section or the database guide. piloop schema database prints
the guide. To keep them, list them in [plugins.role.implementer] sections.
New defaults
A
piloop.toml that sets a key keeps its value. To keep pi, set use = ["pi"].
Only a stop rule or a person stops a campaign
piloop campaign stop by an agent is refused, and the agent escalates a stop instead. After 0.6.0, piloop has no
orchestrator role: see The orchestrator role is removed.
One worker on a home
A secondpiloop worker on one PILOOP_HOME exits and says why. The daemon’s own worker uses its home too, so a
piloop worker on the daemon’s home is refused, and a daemon does not start on a home where a worker runs. Give each
worker its own home.