operator: ambient loop tick carries a live fleet snapshot#369
Merged
Conversation
The ambient loop tick was content-free ("inspect only if useful ... reply
noted"), so the Operator had nothing concrete to react to and defaulted to
"noted" every tick. Observed live: it reported only "repeated ambient operator
loop tick observations ... no errors/approvals/done/fleet alerts surfaced".
Now each tick pulls the daemon session list and injects a compact snapshot:
counts by state, what changed since the last tick (delta), and what needs
attention (errored / long-awaiting). Falls back to the old bare prompt if the
daemon is unreachable. Pure formatter is unit-tested; spec 0021 records it.
Verified live: renders "Fleet now: 5 running, 2 awaiting_input, 0 errored ...".
This was referenced Jun 6, 2026
Merged
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.
Problem
The operator ambient loop (#352) fires every ~5 min but produced no useful observations. The tick injected a content-free prompt:
With no fleet data and a strong silence bias in the system prompt, the Operator had nothing concrete to react to and defaulted to
notedessentially every tick. Confirmed against the live operator — when asked "Any other observations?", it replied:(The data-carrying fleet-event observations only fire on sparse state transitions; between them the ambient loop carried zero signal.)
Fix
Each ambient tick now pulls the daemon session list and injects a compact fleet snapshot instead of a blank prompt:
noted.The Operator's own session is excluded. If the daemon can't be reached, it falls back to the original bare prompt. Delta state is in-memory (resets on adapter restart → first tick emits a baseline with no delta). Lists are capped to stay low-noise. The loop interval, orchestrator-only gate, and fleet-event pipeline are unchanged.
Verification
format_ambient_observation) is unit-tested: counts exclude self, and a running→errored transition surfaces as a delta with updated counts.interactivetests pass.Spec:
specs/0021-operator-ambient-tick-carries-fleet-snapshot.md. Code is inagentd-adapter-zarvis.