Building a signed handoff protocol for AI coding agents A developer built Relay, an open-source Go daemon that creates a signed handoff protocol for AI coding agents. When an agent hits a usage limit, Relay detects the breach, requests a safe pause, snapshots the work via git, builds and signs a continuation contract, and dispatches it to the next available agent. The project aims to prevent context loss between agent sessions and is available on GitHub under Apache-2.0. If you run more than one AI coding agent, you've hit this: Claude Code or Codex, or whichever gets deep into a task, hits its usage limit, and everything it knew evaporates. The plan, the half-finished edit, the "don't redo this migration" context. You paste a summary into the next tool by hand and hope you didn't forget anything. I got tired of that enough to build Relay https://github.com/dbisina/relay : a Go daemon that sits in front of whichever agents you run and treats the handoff as a protocol instead of a manual migration. Here's what actually happens when an agent hits a wall. 1. Detect the breach. Relay watches the active provider's quota in real time proxy header when available, session file otherwise, request counting as a last resort . When usage crosses a threshold, it doesn't wait for a 429. 2. Request a safe pause. The adapter is asked for a safe point, usually right after a commit, never mid-edit. This is a real handshake, not a timeout guess: \ go type AdapterContract interface { Capability ProviderCapability Run ctx, opts RunOptions, ch chan<- AgentEvent error AwaitSafePauseWindow ctx, breachReason string SafePoint, error ForceStop error } \ \ 3. Snapshot. A git commit on a dedicated session worktree branch. Your main tree is never touched, agents work in .relay/sessions/