Refuse an agent that has no agent CLI to run - #104
Merged
Conversation
An agent takes its CLI from its environment's agent runtime image. init_image stopped standing in for one when the legacy init container was removed, but CreateAgent still accepted an agent that named no environment at all -- and an environment naming no runtime whenever it used the free-form image rather than a catalog one. Both produce an agent the Orchestrator refuses to assemble. It retries on every reconcile cycle and never stops: an assembly failure writes no workload record, so the start-failure backoff counts nothing and the instance is never paused or degraded. The agent is created, reported as created, goes ACTIVE, and never runs. The only trace is a line in the Orchestrator's own log. Both writes now resolve the environment through one path that refuses either shape, so the caller is told at the point they can still fix it. An empty environment_id on update used to clear the reference; it is refused for the same reason.
A volume stopped being a free-standing row reached through an attachment when it became a sub-resource of what mounts it, and 0024 dropped volume_attachments with it. The query naming the agents a volume belongs to was left pointing at the dropped table, so DeleteVolume and every volume notification answered "relation volume_attachments does not exist" -- an internal error on a path that has no reason to fail. It reads volumes now: a volume hangs off an MCP, whose agent it belongs to, or off an environment, which every agent running there takes its configuration from.
This was referenced Aug 27, 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.
CreateAgentaccepted an agent that named no environment, and one whose environment named no agent runtime image whenever it used the free-form image rather than a catalog one. Both produce an agent the Orchestrator refuses to assemble.It retries on every reconcile cycle and never stops: an assembly failure writes no workload record, so the start-failure backoff counts nothing and the instance is never paused or degraded. The agent is created, reported as created, goes ACTIVE, and never runs. The only trace is a line in the Orchestrator's own log — which is how it went unnoticed long enough to account for most of the e2e suite failing.
Both writes now resolve the environment through one path that refuses either shape. An empty
environment_idon update used to clear the reference; it is refused for the same reason.Also here:
agentIDsForVolumestill queriedvolume_attachments, dropped by migration 0024 when a volume became a sub-resource of what mounts it — soDeleteVolumeand every volume notification answered "relation does not exist". It readsvolumesnow.Verified on the local bundle VM with agents running from source: the go-core orchestrator suite goes from no agent workload starting at all to 36/45 passing.