$ fssg build --deterministic --validate |

Four Clocks Every AI Agent Runtime Must Keep Separate

AI Engineering

An AI agent does not live on one timeline. It lives on at least four, and a runtime that collapses them into one timestamp will eventually make the wrong decision with complete confidence.

The four clocks are:

  1. model time — when inference started, streamed, timed out, or returned;
  2. workflow time — where the durable process is in its logical history;
  3. effect time — when the outside world accepted, rejected, or may have accepted a mutation;
  4. evidence time — how recently the facts authorizing the next action were observed.

This distinction is not bookkeeping. It decides whether a retry is safe, whether an approval is still valid, whether replay reproduces a decision, and whether a successful-looking run actually proves anything.

One timestamp cannot answer four questions

Consider an agent that prepares a payment, requests approval, calls a provider, loses the response, and resumes after a worker restart.

A field such as updated_at: 16:02:11Z cannot tell the runtime:

  • whether the model answer was generated before or after the approval;
  • whether the workflow has replayed past the approval event;
  • whether the payment provider committed the charge;
  • whether the account balance used by the policy is still fresh.

These are different questions because they belong to different state machines.

This is one reason I describe an AI engineering runtime as more than a wrapper around a model call. The runtime owns the boundaries between clocks. The model can propose an action, but it cannot decide that old evidence is fresh or that an uncertain effect is safe to repeat.

Clock 1: model time measures computation, not truth

Model time covers request start, first token, completion, cancellation, provider timeout, and model identity. It is useful for latency budgets, fallback policy, and tracing.

It does not establish when the answer became true.

A model may spend thirty seconds reasoning over evidence fetched ten minutes earlier. A faster fallback may complete later in wall-clock order but operate on a different prompt, model revision, or tool snapshot. If the runtime records only completion time, it loses the provenance required to compare those outputs.

I want model results to carry at least:

{
  "inference_id": "inf_2048",
  "started_at": "2026-10-18T13:28:04Z",
  "completed_at": "2026-10-18T13:28:31Z",
  "model": "provider/model-version",
  "input_artifact": "sha256:...",
  "evidence_cutoff": "2026-10-18T13:27:52Z"
}

The important field is not merely completed_at. It is the binding between the result and the exact input and evidence horizon.

Clock 2: workflow time orders decisions

Durable workflow systems recover by recording an event history and replaying it to reconstruct state. Temporal documents this directly: commands become persisted events, and workers replay the event history after failure.

That history creates a logical order independent of whichever machine happens to run the code now. The workflow can say: approval was recorded before execution was scheduled, even if a restarted worker has a different local clock.

For an agent runtime, workflow time should be represented by identities such as:

workflow_id / run_id / event_sequence

This is the clock of causality. It answers: which decision came before which transition?

It does not prove that an external side effect happened. A workflow event saying “send requested” is not a bank record saying “transfer committed.” Event history preserves the runtime’s decisions; it does not magically absorb the state of every external system.

Clock 3: effect time belongs to the external system

Effect time begins when the runtime crosses a side-effect boundary: sending money, publishing content, creating a ticket, rotating a key, or changing infrastructure.

The dangerous state is not only success or failure. It is unknown.

requested -> accepted
requested -> rejected
requested -> unknown

A network timeout after submission does not move the effect back to “not attempted.” It leaves the runtime without authoritative knowledge. Retrying from model time or workflow time alone can duplicate the mutation.

This is why effect identity must survive attempts. A new retry may need a new attempt_id, but the intended mutation keeps one stable effect_id or idempotency key. The runtime must reconcile against the external authority before repeating an uncertain write.

I explored this failure mode in Effect IDs Before Retry and the practical recovery side in Build a Compensation Ledger for AI Agent Workflows. The clock model explains why both mechanisms are needed: retry policy controls attempts, while effect time controls reality.

Clock 4: evidence time expires authorization

Evidence time is the most neglected clock.

An agent may have a valid approval and still lack valid authority to act because the facts behind that approval have expired. Inventory changed. A deployment target moved. A branch advanced. A security policy was updated. A price crossed a limit.

So authorization should bind not only an action but also an evidence horizon:

{
  "approval_id": "apr_91",
  "action_hash": "sha256:...",
  "evidence_observed_at": "2026-10-18T13:27:52Z",
  "valid_until": "2026-10-18T13:32:52Z",
  "required_rechecks": ["balance", "target_revision"]
}

After valid_until, the approval record may remain historically authentic, but it is no longer sufficient for execution. This is the difference between “the user approved” and “the runtime is still authorized to commit now.”

A practical decision matrix

Before any retry or commit, the runtime should ask all four clocks:

Clock Question Typical artifact Unsafe shortcut
Model What computation produced this proposal? inference receipt trust latest text
Workflow What causal transition are we in? event history / sequence trust local process state
Effect What did the external system commit? effect receipt / reconciliation result retry after timeout
Evidence Are the authorizing facts still current? observation set / expiry policy reuse old approval

A safe commit requires agreement, not a single green status:

proposal is bound to exact input
AND workflow transition is current
AND prior effect is absent or reconciled
AND required evidence is fresh

If one clause is unknown, the correct result is usually not “try harder.” It is “stop at the boundary that lost time.”

Replay is not time travel

Replay reconstructs workflow state. It does not reverse external effects, refresh evidence, or make a previous model call current again.

That boundary matters when combining graph frameworks, agent harnesses, and durable workflow engines. Each may persist some state, but persistence is not a universal clock. The architecture still needs a named owner for model provenance, causal history, external effects, and evidence freshness.

The canonical question is not “can this agent resume?” It is:

Can it resume without confusing when it thought, when it decided, when reality changed, and when its evidence expired?

That is the time model I want in an engineering-grade agent runtime. Four clocks, four owners, explicit joins. Anything less makes recovery look deterministic while leaving the most consequential timestamp implicit.

Sources

FACET AI CLI Terminal
facet@ai:~$