Which Agent Runs Produced Verifiable Results?

Join scheduler and Cloudflare Workers logs to a Git revision or artifact digest. Require independent verification of that same identifier, and check recent worker availability separately.

Reconcile expected runs against the output receipt

Build the expected-run list from the scheduler before querying Cloudflare Workers Logs. Workers Logs can capture invocations, custom events, and exceptions, so give each dispatch a stable run ID and add a separate attempt number when retrying. Have the writer log a Git commit ID or file digest only after the output is available to a reader. The reviewer should read that exact revision or file and log the same identifier after the acceptance check passes. Suppose run r42 reports artifact a7, then its retry reports b8. A verification for a7 that arrives afterward is stale if b8 is the candidate under review. A scheduler row with no start record should stay visible as a separate gap. Check logging coverage for that interval before treating the absence as evidence that dispatch failed.

Workers Logs · Cloudflare Workers docs

Test whether the worker can still reach its workspace

Add a short canary issued by the same dispatcher that handles real work. Have it read a known fixture revision and return a receipt from the configured workspace. A front-end health response can succeed while the workspace or execution context is unavailable. Daytona’s SDK, for example, surfaces a typed error when a named interpreter context has vanished and leaves the caller to decide what to rerun. For a reproducible check, compare a canary against a known-good test context with one against a deliberately absent context. Keep the previous success record visible and verify that it ages past your freshness limit. If the canary passes while a job lacks a matching verification receipt, inspect the job’s write and review handoff. If the canary fails, check worker and workspace availability before issuing more work.

GitHub - daytona/clients: Official SDKs, API clients, and CLI/MCP tools for Daytona, the secure and elastic infrastructure for running AI-generated code · GitHub

Trace a missing result through the logs

Have the scheduler or wrapper record the run ID, scheduled time, actual start time, end time, exit status, and validation result. Put the same identifier in the job’s diagnostic events. If your dispatcher is a Cloudflare Worker, Workers Logs captures invocation and custom logs. Add an event after dispatch and another when you receive the job outcome, so the dispatcher’s exit and the agent’s completion are distinguishable.

In an illustrative case, a 02:00 run has a dispatch event and the job wrapper records exit code zero, but the current CSV contains only headers. If the expected test fixture has 12 rows, mark the artifact check failed and inspect input selection and filtering. If the dispatcher has no event for the run, start with the scheduler instead.

Workers Logs · Cloudflare Workers docs

Check that the worker can do work now

Use an independent observer to send the worker a harmless request with a fresh identifier. Require a response containing that identifier by a deadline you set for the workflow. A reachable host can still have a stalled worker, so pick a probe that exercises the component that actually accepts jobs. Repeat the check after a routine restart and record the time to the first valid response.

For a worker using the Daytona V2 SDK, the documented process reconnection can help you recover logs after a monitoring client disconnects. Inspect those logs for the last recorded stage and use the fresh probe to test present availability. If you can replay yesterday’s log but today’s probe times out, investigate the current worker before replaying saved work.

GitHub - daytona/clients: Official SDKs, API clients, and CLI/MCP tools for Daytona, the secure and elastic infrastructure for running AI-generated code · GitHub

Compare spend per accepted result

Join usage records to run IDs so you can see whether retries raise the cost of producing an accepted result. The Claude Agent SDK reports client-side cost estimates. Use those for quick diagnosis and reconcile billed totals with the provider’s billing records. If billing is aggregated across several jobs, label your allocation method so operators can distinguish it from a per-run charge.

For illustrative arithmetic, suppose ten runs show $2.50 in combined model estimates, allocated host cost is $1.50, and eight results pass review. The working estimate is $4.00 divided by eight, or $0.50 per accepted result. Verify the actual model rate units, any extra request fees, and the host’s billed units before using that figure in a budget. Keep failed attempts in the cost numerator.

Track cost and usage - Claude Code Docs

Sources