An agent can fix a problem while the system running it reports failure. I ran into that while automating engineering work around Constructive: the useful change had happened, but the report was missing or pointed to the wrong artifact. Run status alone gave the wrong answer.
The reverse happens too: a worker finishes its instructions while the original problem remains. Once work crosses repositories, CI and deployment, a completed conversation is a poor unit of success.
These are lessons from that workflow, using generalized examples rather than our infrastructure map.
Separate the work from the judgment
Initially, a manager conversation coordinated specialist agents. But I was still the event bus: noticing failed checks, relaying results and deciding whether to try again. The conversation remembered the story without providing an inspectable record of what changed.
Splitting that responsibility gives two loops:
- The inner loop receives a bounded task, inspects evidence, makes a scoped change and verifies it.
- The outer loop selects the task, checks the actual effect and decides whether to close the objective, retry or change the workflow.
The supervisor ran outside the worker runtime. This topology separates those existing responsibilities from the durable case model still proposed:
flowchart TB
subgraph observed["Observed workflow · generalized components"]
O["Outer supervisor<br/>Select scope and judge outcome"]
subgraph runtime["Worker runtime"]
W["Targeted inner worker<br/>Inspect → change → verify"]
T["Deterministic waiter<br/>Deadline and terminal result"]
end
X["Repositories · CI · deployment<br/>Actual external state"]
E["Evidence<br/>Reports, revisions, check references"]
O -->|Bounded task| W
W -->|Scoped action| X
W -->|Wait for check| T
T -->|Observe| X
T -->|Resume with result| W
W -->|Report and references| E
E -->|Review| O
O -->|Reconcile independently| X
end
P["Proposed native case model<br/>Join attempts, effects and follow-ups"]
E -.->|Durable correlation| P
P -.->|Next-task context| OThe boxes are logical responsibilities, not separate services. The dashed links are an extension to build, not a completed autonomous supervisor.
A failed attempt can have a successful effect
Three states need separate evidence:
| State | Question | Evidence |
|---|---|---|
| Attempt | Did this worker finish? | Worker result or timeout |
| Effect | What changed outside it? | External check, revision or artifact |
| Objective | Is the original problem resolved? | Verification against acceptance criteria |
The missing-artifact incident makes the difference concrete. Revision A below is synthetic. The upper path summarizes the incident; the lower path shows how the supervisor should choose the next task.
flowchart TB
subgraph incident["Observed incident · simplified"]
A["Updater selects A<br/>Required image missing"] --> B["Worker repairs build<br/>Report handoff fails"]
B --> C["Attempt: failed<br/>External check: artifact exists"]
end
subgraph decision["Proposed objective-level decision"]
D{"Revision selection verified<br/>against missing images?"}
D -->|No or unknown| W["Targeted next task<br/>Repair and test selection"]
W --> E["Return selection-test evidence<br/>and exact revision"]
E --> D
D -->|Yes| F["Close objective<br/>with evidence"]
end
C -.->|Reconcile effect before retrying| DRebuilding A again would miss the unresolved selection rule. The incident justified separating these states; it did not prove recurrence prevention was finished.
Make each handoff inspectable
A worker needs an objective, scope, starting revision and limits. Its result needs external references and unresolved questions, not just a success label.
sequenceDiagram
participant O as Operator / supervisor
participant W as Bounded worker
participant C as CI and external systems
participant E as Evidence store
O->>W: Objective, scope, starting revision, limits
W->>E: Persist attempt, intent and starting revision
W->>C: Inspect, change, trigger check
W->>E: Save action and external reference
C-->>E: Check result / revision / artifact
W-->>O: Report and unresolved questions
O->>C: Reconcile actual external state
O->>E: Record judgment and next action
alt Objective unresolved
O->>W: New bounded attempt with updated evidence
else Objective verified
O->>E: Close objective with evidence
endThis sequence is the proposed handoff contract, not a claim that the native case model already exists. An intent record also does not make an external action exactly-once. After a lost response, reconcile the recorded target and external state before retrying.
End each attempt as verified, failed, blocked or unresolved because evidence is incomplete. Persist the result outside the worker so it survives a timeout. A dashboard can then project what was attempted, what changed and what remains unknown.
Spend reasoning on decisions, not waiting
The outer loop compares conflicting evidence and rewrites the next task. That is a useful place for a stronger reasoning model. A lower-cost worker can handle narrow tasks with precise inputs and executable verification, escalating when ambiguity or scope grows.
This is a routing strategy, not a proven cost advantage. Several weak attempts can cost more than one strong attempt. Measure verification against the intended revision, retries, human corrections, waiting time and actual billed cost. Cached token counts alone are not a cost comparison.
Mechanical waiting belongs in code. If CI is still running, another model completion will not finish the build. Use a deterministic waiter with a deadline, then resume with a compact result. Illustrative pseudocode:
result, err := waitForCheck(ctx, runID, deadline)
if err != nil {
return Blocked("check observation incomplete", runID)
}
if result.Pending {
return Blocked("deadline reached", runID)
}
return ResumeWorker(TaskInput{
Revision: expectedRevision,
Check: result,
Evidence: savedReferences,
})Independent workflow branches can still serialize through a shared conversation or execution lock. Isolate attempts with separate sessions, bounded inputs and explicit external references so one release wait does not hold up an unrelated investigation.
What the runs actually established
Reviewing real runs exposed status/report mismatches, repeated CI waiting and hidden serialization. Simplifying the workflow and moving deterministic waits into code addressed identifiable failure modes.
That evidence does not establish production autonomy. A disposable-environment deployment does not prove in-place migration safety; a repaired CI run does not prove recurrence prevention. Each needs its own acceptance criteria.
Give the worker a testable task. Give the supervisor enough evidence to disagree with it. Then improve the step that consumed time or produced the wrong conclusion.
Resources
- GitHub Actions workflow runs: external run identities and status.
- Kubernetes controllers: observed state and reconciliation.
- OpenTelemetry traces: correlating work across boundaries.