-
-
Lead-Protocol: verifiable continuity for AI coding agents.
-
Session open registers the active pair and returns canonical files with SHA-256 receipts.
-
Session close validates the handoff and checklist, preserves peer state, and writes a stable terminal record.
-
A new session resumes from previousHandoff after a validated close, preserving the prior agent's stable state.
Inspiration
AI coding agents are powerful, but each new session can lose the operational context of the last one. With multiple assistants, unfinished work, decisions, ownership, and checkpoints can become inconsistent or disappear. I wanted a simple coordination layer that works across coding tools without depending on a hosted service or a proprietary chat history.
What it does
Lead-Protocol is a vendor-neutral, file-based continuity layer for AI coding agents.
It gives each (actor, agent) pair a durable handoff and a verifiable session lifecycle:
session openregisters the active pair and returns canonical file paths plus SHA-256 hashes.checkpointwrites a timestamped shared snapshot without overwriting another agent's state.session closevalidates the required fields and checklist, writes a stable handoff, and removes only the closing session from the active registry.- A later
session openreturnspreviousHandoff, so a fresh agent can resume without asking a human to reconstruct the earlier work.
The state is readable in Git, works locally, and can be used from Windows, macOS, or Linux.
What I built during OpenAI Build Week
Lead-Protocol and its core engineering existed before Build Week. The new work submitted here is the executable and verifiable lifecycle around:
session open,checkpoint, andsession close;- canonical receipts and SHA-256 evidence;
- ownership, concurrency, peer-session preservation, and transactional rollback safeguards;
- lifecycle regression tests and installed-package smoke coverage.
The published version demonstrated in this submission is v2.1.4.
How I built it
I used Codex throughout the Build Week work to accelerate implementation, fault-injection tests, release validation, and installed-package verification.
GPT-5.6 Sol performed an independent public adversarial review of the lifecycle. It identified real defects involving transactional rollback, receipt ownership, concurrency, and peer-session preservation. Codex and I turned those findings into public fixes and regression tests.
GPT-5.6 was an engineering collaborator during development, not a runtime dependency of the CLI.
Challenges
The difficult part was not creating files; it was preserving state safely when operations are interrupted or when more than one agent is active.
The lifecycle must reject malformed or pristine project state before mutation, prevent a same-pair operation from taking ownership twice, preserve peer-owned registry rows, validate receipt ownership, and roll state back if an operation fails partway through.
Those constraints led to focused fault-injection tests instead of relying only on the happy path.
Try it
Install the published package and initialize a clean project:
bash npx @leadsolutions/lead-protocol@2.1.4 init --yes
Then follow the executable lifecycle in the public README.
Log in or sign up for Devpost to join the conversation.