Inspiration

Coding agents write real code from live documentation: API changelogs, SDK guides, model-lifecycle pages. We watched sessions consult a provider's docs, modify integration files, and end. Taking the link between source and code with them. Weeks later the docs change, and the only options are memory, grep, or re-reviewing everything. Package managers solved this for code dependencies decades ago with lockfiles. Nothing had solved it for knowledge dependencies.

What it does

Berest wraps a coding-agent session at the process boundary ( berest run -- codex). During the session it records which HTTP sources were consulted and which workspace files changed, storing identity, fingerprints, and hashes. Never content. It links them with a deliberately conservative May Affect relationship: both were observed in the same session; Berest claims the evidence and nothing more.

flow

Later, berest check re-fetches every captured source and compares fingerprints. A changed source with downstream files produces at most one open Recheck Item per source-and-file pair, in a local CLI inbox: recheck-<id> [open] payment-webhooks.md may be affected by <source> (sha256:<hash>). You inspect the evidence with berest graph, then acknowledge, confirm, or dismiss. Every lifecycle state has a name: open, acknowledged, confirmed, dismissed. Capture is automatic in three tiers, the harness's own tool calls first, MCP tool calls second, a live network proxy last, ranked by how directly the retrieval was observed; source record names a source the session never touched.

arch

How we built it

Built from an empty repository during the submission period with Codex and GPT-5.6. Codex wrote the Rust core: the wrapper boundary, capture instrumentation, a single local-writer process with an append-only event log, source fingerprinting, and the recheck lifecycle across retained sessions. GPT-5.6 drove the product requirements document, the domain glossary that keeps the CLI's language honest ("May Affect", never "caused"), and the demo copy. The loop is proven by an automated end-to-end test that wraps a Codex-stand-in, captures a controlled source, mutates it, and asserts the exact recheck output. The same loop a judge reproduces from the README's demo script.

Challenges we ran into

Capturing without lying. A wrapper that watches an agent must not overclaim what it saw: we modeled Evidence Quality explicitly and made "May Affect" the strongest statement the system can make. Second, transparent wrapping — a wrapped session must behave exactly like an unwrapped one; that constraint drove the process-boundary design instead of forking any harness, and shipping the interactive wrapper was the hardest cut of this submission slice.

We also didn't have enough ChatGPT credits just from the $100 credit allowance to finish this.

Accomplishments that we're proud of

The complete loop runs end to end through public CLI commands and is enforced by tests. A judge reproduces it in under ten minutes with one script - scripts/demo --rules needs no agenta and no network; scripts/demo --exec runs the full loop against a live Codex session.

berest graph --html also renders the whole lineage as an interactive app a files explorer, a live staleness graph, and the diagram with --mermaid for a flowchart GitHub renders inline.

ui

What we learned

The durable product object isn't provenance data, it's a decision: "this source changed; these files may be affected; record what you did." Every design choice that survived (metadata-only storage, one open item per pair, named lifecycle states) serves that decision.

What's next for Berest

Material Content Rules maturing into a real policy layer, with an audit trail on who changed a rule and why. The interactive lineage app shaped by actually watching people use it: which view they open first, what they click through to, where they get stuck - not by guessing what a graph explorer should look like. Making the repository public.

Built With

  • chatgpt
  • codex
  • gpt-5.6
  • rust
Share this project:

Updates