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:

  1. session open registers the active pair and returns canonical file paths plus SHA-256 hashes.
  2. checkpoint writes a timestamped shared snapshot without overwriting another agent's state.
  3. session close validates the required fields and checklist, writes a stable handoff, and removes only the closing session from the active registry.
  4. A later session open returns previousHandoff, 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, and session 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.

Built With

Share this project:

Updates