Skip to main content
Determinism is optional. Use it when you need stable traces for evals, regression tests, or debugging a specific episode. You can ignore it for casual experimentation.

Quick setup: seed-based determinism

The easiest way to get repeatable behavior is to fix a seed on your session:
With a deterministic model/tooling stack, runs with the same seed will produce the same episode trajectory and metrics. The seed is recorded in summary.json.

Stricter reproducibility (clock + RNG)

If you need fully stable timings/IDs (e.g., evals in CI), add a deterministic clock and RNG:
This locks timestamps, random numbers, and episode timestamps; the configuration is reflected in summary.json.

Replay and comparison

Compare two episodes to check for drift. Ignore timing fields to focus on behavior:

Golden tests (pytest)

Use deterministic sessions in tests:

Episode ID format

Episode IDs are human-readable and sortable:
  • Prefix ep_
  • Date + time for sortability
  • Content hash + entropy for uniqueness
  • Seed suffix (s0 if unset) for reproducibility

Deterministic components (overview)

Direction/governance events use deterministic UUIDv5 IDs so the same inputs produce the same identifiers, making replay comparisons reliable.

Advanced: canonical JSON

Artifacts use canonical JSON so the same data yields the same bytes:
This keeps manifest hashes and diffs stable.

When to use determinism

Use deterministic mode for:
  • Evals and golden tests
  • Debugging specific runs
  • Compliance scenarios that require reproducibility
Avoid deterministic mode for:
  • Production workloads that need real timestamps/IDs
  • Performance benchmarks
  • Security-sensitive operations where predictable IDs are a risk

CI validation

Add deterministic tests and replay checks to CI:
The replay gate includes multiple goldens; one is an enforce-veto run (tests/golden/veto_enforce/run_{a,b}) to ensure governance veto semantics remain deterministic (no Act events, terminate status vetoed, direction_blocked + governance lineage intact).