<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[LastMileOps]]></title><description><![CDATA[LastMileOps]]></description><link>https://lastmileops.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 11:49:30 GMT</lastBuildDate><atom:link href="https://lastmileops.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The agent finished its turn. Did the job actually finish?]]></title><description><![CDATA[An agent says, "Done. The report is ready." The person who needs that report in the morning has a different checklist: the file opens, it belongs to…]]></description><link>https://lastmileops.hashnode.dev/the-agent-finished-its-turn-did-the-job-actually-finish</link><guid isPermaLink="true">https://lastmileops.hashnode.dev/the-agent-finished-its-turn-did-the-job-actually-finish</guid><category><![CDATA[AI]]></category><category><![CDATA[automation]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[LastMileOps]]></dc:creator><pubDate>Thu, 05 Nov 2026 15:57:25 GMT</pubDate><content:encoded><![CDATA[<p>An agent says, "Done. The report is ready." The person who needs that report in the morning has a different checklist: the file opens, it belongs to today's export, and every input row is accounted for. A polite final message does not answer any of those questions.</p>
<p>This matters as soon as someone else depends on the result. While you are sitting beside the agent, you can notice an empty file and ask it to try again. A scheduled job has a deadline and a colleague waiting for its output.</p>
<h2>Three events to keep separate</h2>
<p>The agent finishes its response. A tool finishes its call. The result passes the checks needed for the next step.</p>
<p>They often happen together, but that has to be checked. A CSV written without errors can still be the first page of a larger export. A file with the familiar name can be left over from yesterday's run. A request can also time out after a remote service created the requested object. The connection error alone does not tell you whether the action happened.</p>
<h2>Define completion before the run</h2>
<p>Take a simple example: read a CSV, produce a normalized file, and write rejected rows with their reasons. A useful completion check could require that:</p>
<ul>
<li>The result identifies the input revision it processed.</li>
<li>Required columns exist and the files can be parsed completely.</li>
<li>Each input row is either accepted or rejected with a reason.</li>
<li>Accepted and rejected row counts add up to the input row count.</li>
<li>The output files and validation record belong to the same run.</li>
</ul>
<p>These checks won't tell you that every transformation is correct. They tell you something narrower and still useful: this input produced readable outputs, and no row went missing. Business rules need their own checks.</p>
<p>The process owner defines those rules before execution. If the worker can remove a difficult check and then declare success, a JSON report adds little to its original claim.</p>
<h2>Leave a short record for the next person</h2>
<p>A result can carry a small record such as this:</p>
<pre><code class="language-json">{
  "run_id": "example-001",
  "input_revision": "demo-input-v1",
  "worker_revision": "demo-worker-v3",
  "state": "completed",
  "checks": {
    "input_rows": 12,
    "accepted_rows": 10,
    "rejected_rows": 2,
    "rows_accounted_for": true
  },
  "artifacts": ["normalized.csv", "rejected.csv"]
}
</code></pre>
<p>The numbers are made up. In a real setup, validation code reads the actual files, counts the rows, and checks the input and output identities. A filename or a <code>true</code> that the worker wrote about itself proves nothing.</p>
<p>The record should be useful without the conversation that produced it. A colleague needs the input, the worker revision, the check results, and the artifact locations. They should not have to decide which of five "fixed it now" messages describes the current output.</p>
<h2>Give uncertainty its own state</h2>
<p>An external action sometimes needs more than success and failure.</p>
<p>Suppose the worker asks a service to create a ticket and then loses the response. Retrying immediately can create a second ticket. Keep the original operation identity and mark the outcome as <code>unknown</code> until the first attempt can be reconciled.</p>
<p>If the service provides a suitable idempotency mechanism, use it according to that service's contract. Otherwise, determine how to locate and distinguish the original action before allowing a retry. A new request identifier does not resolve uncertainty about the first request.</p>
<p>Not every service makes that kind of reconciliation possible. When the evidence can't settle the outcome, leave it open for the person responsible.</p>
<h2>Check for runs that never happened</h2>
<p>A clean error log cannot tell you that a scheduled job actually ran. It may be clean because nothing started.</p>
<p>Use a separate deadline check that looks for the expected completed run and its validated artifacts. Define the expected interval, the grace period, and who receives the exception. This checker should distinguish a late run, a failed run, an unverified result, and an unknown external outcome.</p>
<p>Start with one job and one useful deadline. A dashboard is optional; an explicit condition for a missing result is the important part.</p>
<h2>Make the handoff inspectable</h2>
<p>For a small internal tool, begin with three things: a completion condition, a record of each run, and an independent check for a missed deadline. Add complexity when the failure cases require it.</p>
<p>The aim is to let the next person decide whether the result is usable without taking the agent's closing sentence on trust. The records won't guarantee future runs, permissions or fitness for important decisions, but when a handoff fails, they show where.</p>
<p><em>Whenever I get the chance to make my geeky thoughts more pleasant for a wider audience, I don't shy away from what modern AI can do.</em></p>
]]></content:encoded></item></channel></rss>