Autonomous runs
Did it actually get better?
Runs are recorded, baselines are frozen, and a run that regresses can roll back what it installed.
An agent that can install tools and rewrite code can also make things worse. Autonomy records every run so that question has an answer other than an impression.
The run registry
Every run lands in .snaga/eval/runs.sqlite.
snaga eval list # most-recent runs across all goals
snaga eval show <goal_id> # every run for one goal, newest first
eval show is the one that answers "did that install help?" — read the
outcome column against the tools present at each run's start. If a goal started
failing after a tool arrived, that pairing is visible in the table rather than
in your memory of last week.
Baselines
Freeze a known-good state, then compare against it later:
snaga eval baseline freeze known-good
# ... time passes, things change ...
snaga eval baseline diff known-good
diff classifies each goal as Regression, Improvement or Stable.
That is the whole vocabulary, and it is enough: you are asking whether to keep
what changed.
baseline freeze is the only write in this group. Everything else reads.
Rolling back a run that made things worse
snaga --autonomy goal.toml --rollback-baseline known-good
With this armed, the executor compares the run's outcomes against the named baseline when it finishes. If any goal regressed, the SPECs installed during that session are rolled back.
The mechanism is an intersection: goals that regressed, crossed with tools installed this session. Both halves come from records — the eval store and the install ledger — so the decision does not depend on anything the agent believes about itself.
Without the flag, runs are still recorded; nothing is rolled back.
What the agent knows about its own history
snaga autonomy reflect <goal>
This prints the cross-session picture for a goal: how many times it has been attempted, how those attempts ended, the trajectory, and which SPECs were installed in previous tries.
The same summary is put in front of the planner. A goal being re-attempted for the fourth time starts with the model knowing that three previous attempts failed and the trajectory is flat — which is the difference between trying something else and trying the same thing again more confidently.
Keeping the records honest
snaga eval prune # drop old run rows
snaga history prune # trim the SPEC install ledger
Both preserve what something still depends on. eval prune always keeps the
latest run of every goal, so reflection trajectories keep working, and never
touches baselines. history prune keeps any entry touching a currently-installed
SPEC, because rollback needs it to know what to revert.
Age alone does not decide whether a row is garbage. That is worth borrowing if you write cleanup of your own.
The honest limit
All of this measures what you wrote down. A run that satisfies every success criterion and still produces something you would not ship is not a failure of the registry; it is a criterion that did not say enough.
The registry tells you whether a change moved the numbers you chose. Choosing the right numbers is still yours — see Running a goal to completion.