Verified · Portable · Privatev0.3.3 — MIT · by Orvantia

Contextoutlivesthe session.

Scroll

A resume safety gate for AI coding sessions. It checkpoints the real state of your repo, records the tests you actually ran, and tells the next session whether it is safe to touch code.

View on GitHub ↗

Watch it in45 seconds.

The problem · the gate
the handoff

Preview · muted
0:00 / 0:45
The problem

A new session starts with no memory. The handoff says it is done. The repository says otherwise.

The resume gate

Throw somethingat the handoff.

The checkpoint is a snapshot of the real repo. Change the workspace, then watch the gate decide, using the tool's actual messages. Press keys 1 to 8. Tap an action, or just watch: it cycles on its own.

Do something after the checkpoint

Verdict
READY
exit 0
Same commit, same files, a passing test run on this exact state. Safe to continue.
0msto check a repo with 10,000 files and 500 uncommitted changes
0/86labeled drift scenarios behave as expected; the misses are listed in the benchmark
0network calls. No server, no account, no telemetry
0runtime dependencies. Python standard library and git
How it works
4 steps

Record
evidence.

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

$ 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

Save a
checkpoint.

Branch, HEAD and a hash of every uncommitted file go into plain files in your repo. You review the diff first.

$ contextbridge save \ --objective "Add token auth" \ --next "Finish refresh tests" --- a/contextbridge/state.json +++ b/contextbridge/state.json + "branch": "main", + "head": "580df56…", Apply these changes? [y/N] y

Switch
anything.

A new session, another account, a different agent. The handoff is files in the repository, not a private chat history.

# same repo, new account contextbridge/ state.json evidence, work, snapshot graph.json decisions → code → tests sessions.json who is touching what HANDOFF.md what the next agent reads

Resume
safely.

Before any edit, the gate compares the checkpoint with the live workspace and returns one verdict.

$ contextbridge resume --check ## Resume safety gate: REVIEW_REQUIRED Do not edit yet. Inspect each item below… [WARN ] src/auth.py: new uncommitted change [WARN ] no passing test run matches the current workspace state

Knows what isproven and whatis only claimed.

Every item in the handoff carries its source. A task is marked verified only when you link a passing run to it. Everything else says who claimed it, and that nobody has checked.

Observed

VERIFIED
Login endpoint
verified by E1 PASSED, exit 0
@ 2026-10-12T09:41:07Z
workspace fingerprint matches checkpoint

Claimed

UNVERIFIED
Refresh-token tests
claimed by claude-account-a
no linked evidence
a passing run proves a command succeeded, not that the software is correct
Benchmarks

Tested, thenmeasured.

85/86labeled drift scenarios behave as expected
99.9%agreement with an independent oracle over 800 random git histories
65median tokens for a resume check
143msfor 10,000 files
Read the full report →

Everything a realrepo needs.

Evidence

Executed tests, not recollection.

contextbridge run records the command, exit code, timestamp and the exact workspace it ran against. Failed and interrupted runs stay visible.

E1 `pytest -q` → PASSED (exit 0)
E2 `pytest -q` → FAILED (exit 1)
Decisions

A graph, not a flat summary.

Requirement → decision → code → test, with the alternatives you rejected.

R1 → D1 → src/queue.py → test
Drift

Sees what moved.

Branch, commits, edited files, stale assumptions and failed runs.

[WARN ] 2 commit(s) since checkpoint
Privacy

Secrets never get written.

Scanned before every write. Excluded files are never recorded.

[REDACTED:aws-access-key]
Local-first

Plain files in your repo.

No server. No account. No telemetry. Keep them out of git with one flag.

init --local-only
Portable

Any account. Any agent.

Versioned JSON plus a Markdown prompt any assistant can read. Export one file, import it anywhere.

schema: contextbridge/1
Sessions

Claims, advisory by design.

Name the paths each agent is working on and get a warning when claims overlap. It reduces surprises; it does not prevent conflicts.

'auth' ~ 'api': src/auth/
Get started

Install inone line.

Open source, MIT licensed. Try it on a throwaway branch and open an issue if anything is unclear or wrong.

pip install contextbridge-clicontextbridge run -- pytest -qcontextbridge save --objective "Add token auth"contextbridge resume --checkPython 3.9 or newer and git. Nothing else to install.