Skip to main content

RuntimeTruth

Check Codex runtime state against a reviewed baseline.

PyPI Python CI License

RuntimeTruth collects Codex runtime settings and observations from the local environment. It compares them with a reviewed baseline, including model and permission settings, instruction-file fingerprints, and optional MCP server and tool information.

PyPI · Sidelobe overview · Case study · Engineering note · Release notes

Public alpha · v0.2.4. Core inspect, diff, verification, policy, and signed-baseline flows are covered by CI and exercised against real local runtimes.

Why

An agent's effective settings may differ from the values written in its configuration files:

  • model and provider routing
  • system and project instructions
  • tools and MCP schemas
  • skills and plugins
  • sandbox and network permissions
  • executable/runtime versions
  • environment and process identity
  • repository/code state

A deployment can therefore look unchanged while the effective agent runtime has drifted.

RuntimeTruth currently focuses on two questions:

  1. What runtime state can be established with explicit evidence?
  2. What changed since a known baseline?

Broader policy evaluation and organizational provenance remain later phases. The current policy file is intentionally narrow: it persists only the evidence selectors that should gate runtime verification.

Distribution and limits

RuntimeTruth is currently distributed as free, local-first open-source software. There is no RuntimeTruth hosted control plane, account system, telemetry service, paid support plan or SLA.

A verification result is deliberately narrow: PASS means the selected evidence matched the selected baseline. It does not mean the agent is secure, compliant, safe, or correctly configured in ways RuntimeTruth did not inspect.

See the trust model, data handling, support policy, and MIT License for the current project boundary.

Origin

RuntimeTruth grew out of operating self-hosted workers and noticing that source code and deployment configuration were not enough to answer a simple question: what is actually running right now?

The project is built from evidence outward. It started with systemd, procfs, and Git identity, then used the same model to inspect agent-specific Codex state.

Read the origin story.

Installation

For the CLI, use an isolated tool environment:

pipx install runtimetruth

or:

uv tool install runtimetruth

Standard pip is also supported inside a virtual environment:

python -m pip install runtimetruth

Then verify the install:

runtimetruth --version

For CI workflows that require an exact source revision, pin the Git commit rather than following a moving branch. See CI integration.

Quick start

Capture effective Codex runtime state:

runtimetruth inspect codex . --resolve-thread --pretty > baseline.json

Verify the current runtime against that baseline:

runtimetruth verify baseline.json --codex . --resolve-thread

Protect only selected runtime invariants when strict snapshot equality is too broad:

runtimetruth verify baseline.json --codex . --resolve-thread \
  --protect codex.thread.model \
  --protect codex.instructions

Persist repeated selectors in an explicit TOML policy:

version = 1
protect = [
  "codex.thread.model",
  "codex.thread.sandbox",
  "codex.instructions",
]
runtimetruth verify baseline.json --codex . --resolve-thread \
  --policy .runtimetruth/policy.toml

The same policy can be used with verify-attestation; signer identity and baseline binding are verified before policy evaluation.

Add --json for a versioned machine-readable PASS/DRIFT report.

For portable signed baselines and signer identity verification, see signed baseline attestations. This is optional and requires Cosign installed separately.

Optional signed baselines

RuntimeTruth's ordinary installation and its inspect, diff, digest, and verify commands do not need Cosign. Baselines can be reviewed and protected through the surrounding workflow.

For signed provenance, install Sigstore Cosign separately and use attest and verify-attestation. These commands keep the existing in-toto/Sigstore format and require explicit signer identity verification. CI exercises this integration with Cosign v3.0.6. See the attestation guide for setup and examples.

Current CLI

Inspect a local target:

runtimetruth inspect systemd <unit>
runtimetruth inspect git <path>
runtimetruth inspect codex <cwd>
runtimetruth inspect codex <cwd> --resolve-thread
runtimetruth inspect codex <cwd> --resolve-mcp

Compare two snapshots:

runtimetruth diff <before.json> <after.json>

Verify a current snapshot against a baseline:

runtimetruth verify <baseline.json> <current.json>

To require a recent current observation, add --max-age with a positive number of whole seconds:

runtimetruth verify baseline.json current.json --max-age 300

This optional check also applies to verify-attestation. It checks only the current snapshot, so a reviewed historical baseline remains usable. Expired or future-dated current evidence is an error, even when its values match. See the freshness boundary for clock and timestamp limitations.

Or collect the current Codex runtime and verify it directly:

runtimetruth verify <baseline.json> --codex <cwd> --resolve-thread
runtimetruth verify <baseline.json> --codex <cwd> --resolve-mcp

Verification uses stable process exit codes:

  • 0 — runtime matches the baseline
  • 2 — semantic runtime drift detected
  • 1 — collection, input, or comparison error

Selective runtime invariants can be protected explicitly:

runtimetruth verify baseline.json --codex <cwd> --resolve-thread \
  --protect codex.thread.model \
  --protect codex.instructions

For automation, add --json to emit a versioned structured PASS/DRIFT report without changing the exit-code contract.

Canonical baseline identity and signed verification are separate commands:

runtimetruth digest <baseline.json>

runtimetruth attest <baseline.json> \
  --statement <baseline.intoto.json> \
  --bundle <baseline.sigstore.json>

runtimetruth verify-attestation <baseline.json> [current.json] \
  --statement <baseline.intoto.json> \
  --bundle <baseline.sigstore.json> \
  --certificate-identity <expected-identity> \
  --certificate-oidc-issuer <expected-issuer>

verify-attestation can also use --codex <cwd>, --resolve-thread, --resolve-mcp, --policy <file>, repeatable --protect, and --json.

Only attest and verify-attestation require the external Cosign executable. A missing Cosign installation does not affect normal runtime verification.

--resolve-thread creates an ephemeral Codex thread without starting a turn. --resolve-mcp additionally probes thread-scoped MCP runtime state and may contact configured MCP servers or refresh authentication; it does not call MCP tools.

Evidence currently collected

The current implementation collects:

  • systemd unit/runtime state
  • procfs process identity
  • Git repository identity
  • Codex executable/version
  • Codex canonical resolved workspace configuration
  • effective state materialized for an ephemeral Codex thread
  • Codex-reported instruction source paths
  • SHA-256 fingerprints of those instruction source files without storing their plaintext
  • thread-scoped MCP server status and bounded tool-catalog fingerprints

Each evidence record keeps its provenance and is classified as declared, resolved, or live where the source supports that claim.

Project boundary

RuntimeTruth is not intended to become a generic process monitor, LLM trace backend, MCP proxy/firewall, GitOps controller, or hosted observability dashboard.

The current focus is external validation of the baseline, attestation and policy model before adding additional agent adapters or cloud features.

See:

Development

Requires Python 3.12+.

python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
ruff check .
ruff format --check .
pytest

License

MIT.

Metadata

Release files for runtimetruth 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runtimetruth 0.2.4
File Size Uploaded Provenance Actions
runtimetruth-0.2.4.tar.gz 205.7 kB With provenance Details for runtimetruth-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for runtimetruth 0.2.4
File Interpreter ABI Platform Actions
runtimetruth-0.2.4-py3-none-any.whl Python 3 none any Details for runtimetruth-0.2.4-py3-none-any.whl

Total release size: 235.4 kB

Release files / runtimetruth-0.2.4.tar.gz

Download URL runtimetruth-0.2.4.tar.gz
Size 205.7 kB
Tags Source
SHA-256 checksum
How to use checksums
abc161088cdca0ac0ff69eafaa2d103894a8b8873b138dcebf5a4431e77f6bf5
BLAKE2b-256 checksum
How to use checksums
644f1cfe14ba302dc7908b2d5b69a4d19fc5aebddbab5704e0288bc29447d290
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / runtimetruth-0.2.4-py3-none-any.whl

Download URL runtimetruth-0.2.4-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6130befaf7eb1e8f695f0d103ae26d49348d2a06e1389476a894ea4da95d505
BLAKE2b-256 checksum
How to use checksums
075b9b6840120a1eca16a897e9db1cbf6ad0c682e7c7cd7768a53e9db94b04cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for runtimetruth 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for runtimetruth-0.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page