01Product · Open source

ContextBridge

Context outlives the session.

Visit the site ↗pip install contextbridge-cli
$ contextbridge run -- pytest -q
E1 `pytest -q` → PASSED (exit 0, 3.4s)

$ contextbridge work add "Login endpoint" \
    --status completed --evidence E1
Updated: state.json, HANDOFF.md

● READY · safe to resume
02The idea

ContextBridge is a resume safety gate for AI coding sessions. When work moves between sessions, accounts or agents, it checkpoints the real state of the repo, records the tests you ran, and tells the next session whether it's safe to edit code.

03How it works
01

Record

Run your tests through ContextBridge. The command, exit code and time are stored - whether it passes or fails.

02

Save

Checkpoint the branch, HEAD and file hashes as plain files, with a diff review before anything is saved.

03

Switch

Hand the work to another session, account or agent. The state travels with the repo, not the chat.

04

Resume

The next session runs the gate first. It reports READY, REVIEW or BLOCKED based on what changed since the checkpoint.

04Measured
85/86
Drift scenarios passed
65
Tokens, median resume check
143 ms
To check 10,000 files
0
Network calls

Figures from the project's own benchmarks: labelled drift scenarios, resume-check size, and a 10,000-file check. It also reports 99.9% agreement with an independent oracle across 800 random git histories. Zero runtime dependencies beyond Python's standard library and git.

05What's inside

Evidence

Records test commands, exit codes and timestamps, including the failures.

Checkpoints

Stores branch, HEAD and file hashes as plain files, with a diff review before saving.

Decision graph

Links requirements, decisions, code and tests, so the reason survives with the change.

Drift detection

Flags commits since the checkpoint, changed files and failed runs.

Secret redaction

Scans before writing. Best-effort - it reduces risk, it does not replace review.

Local-first and portable

JSON and Markdown files in your repo. No account, no telemetry.

Advisory session claims

Warns when two agents claim overlapping paths.

ContextBridge is free, MIT-licensed and sponsored by Orvantia. If you want AI-assisted work built into your team's process, that's what we do.

Visit ContextBridge ↗