← Back to blog

Why I made run graphs content-addressed

0xcircuitbreaker··8 min read

Content addressing gives data an identity derived from the data itself. Git applies that idea to source history. opentine applies it to the immutable payload of an agent step.

Stable identity

A .tine v2 step ID is a full SHA-256 hash over canonical immutable fields including parent links, kind, inputs, outputs, model or tool metadata, and errors.

A v2 step ID can be formed before save-time redaction, so it may not identify the exact serialized step bytes. The artifact digest is the serialized-body check. Repository v3 uses the stricter ordering: redaction happens before object hashing.

Runtime observations such as duration can change without pretending the logical step became a different piece of history. The format policy defines the precise protected boundary.

Reusable prefixes

When a run forks, its known history does not need to be copied into an unrelated sequence. Both branches can refer to the same ancestor graph and diverge from a selected step.

tine fork failed.tine --from-step 3 --save retry.tine

That shared lineage is what makes the later diff meaningful. It can identify the common ancestor, the divergent steps, and—in 0.2—the fields that changed at aligned positions.

Content identity and intervention identity

Content-addressed steps describe immutable recorded work. Verified v3 repository objects are content-addressed as well. A portable v2 run fork has a different job: since v0.4, its default ID also commits to the fork act, including branch, declared intent, and a random nonce. Two decisions made from the same content prefix therefore remain distinct even before their new suffixes diverge.

Cached replay explicitly opts into reproducible fork identity. This is not a contradiction; it separates "same recorded operation" from "new intervention."

Cache provenance, not magical determinism

Cache replay reuses recorded work. It does not claim that a live model call would necessarily produce the same output again.

tine replay result.tine --mode cache --save replayed.tine

An explicit rerun goes through a native runtime or harness. The difference between reused evidence and newly executed work stays visible in the artifact.

Integrity

The artifact stores a digest that tine verify recomputes.

tine verify result.tine

This detects a mismatch between stored content and its recorded checksum. Version 0.2 adds optional signatures when a workflow also needs key-based authenticity.

Portability

Content hashes do not depend on a database row ID. Move an artifact between machines and its identities remain stable as long as the protected content is unchanged.

That is the practical value of content addressing here: agent history becomes a graph with stable names, verifiable bytes, reusable lineage, and explicit provenance.