Inspiration

Git is excellent at recording what changed. Coding agents have a different coordination problem: they also need to know what another agent is changing right now.

When two agents work in separate worktrees or clones, both can make locally sensible changes and still break the project together. They usually discover the semantic collision during integration, after spending time, tokens, and tests. Sharing complete chat histories is not a good answer either: it is noisy, provider-specific, expensive, and may expose private reasoning.

PACT started from a simple question: what would a collaboration protocol look like if it were designed for coding agents rather than adapted from human chat?

What it does

PACT is a provider-neutral live coordination protocol for coding agents. It lets Codex, Claude, and future runtimes:

  • declare their objective and the semantic surfaces they expect to change;
  • see active agents and discover overlapping or dependent work;
  • receive compact, relevant project context instead of another agent's conversation;
  • publish proposed overlays, checkpoints, evidence, and required actions;
  • leave revision-pinned, verifiable handoffs that another agent can resume.

Git remains the source of truth for code. PACT stores the coordination state that exists before and between commits. Provider credentials, source files, prompts, complete conversations, and chain-of-thought do not belong on the shared Team service.

How it works

  1. A project is initialized once with pactctl init.
  2. Each agent joins with an objective, workspace, Git revision, and semantic surfaces such as a file, symbol, contract, or service.
  3. PACT detects relevant relationships and returns bounded context plus any required action.
  4. Agents refine intent, publish overlays, checkpoint progress, attach test evidence, and resolve handoffs while they work.
  5. A durable event journal and opaque cursors let agents leave, restart, and resume without replaying old conversations.

Local mode coordinates agents in one repository and sibling Git worktrees. Team mode moves only the structured coordination record to a shared PostgreSQL-backed service so collaborators can work from separate clones. The current Team lifecycle is available through explicit CLI commands; automatic Team transport inside both provider hosts is the next integration.

What we built

The PACT 0.1 reference implementation includes:

  • versioned JSON Schemas and conformance fixtures;
  • a dependency-free CLI and local hash-chained daemon;
  • deterministic semantic-surface overlap and typed producer/consumer handoffs;
  • speculative overlays, checkpoints, leases, resume, and restart recovery;
  • a provider-neutral JavaScript driver and six-tool MCP bridge;
  • shared agent-host lifecycle with thin Codex and Claude launchers;
  • a Team HTTP service with isolated credentials and PostgreSQL persistence;
  • Docker, Nginx, Terraform, and a live OCI deployment;
  • a repeatable one-command two-agent demo; and
  • PACT Bench, an experiment harness with immutable, graph-ready results.

Testing the hypothesis

We built PACT Bench because a coordination layer is only valuable if it prevents more work than it creates. A preliminary counterbalanced pilot compared three conditions on the same two-agent semantic-conflict fixture: Git-only baseline, a passive shared ledger, and active PACT coordination.

Across 12 valid trials, PACT integrated successfully in 3 of 4 trials. The Git-only baseline and passive ledger integrated successfully in 0 of 4 each. PACT detected all four dependencies with no false alerts in those trials.

The denominator matters. This is one scenario and four PACT trials, not proof of a universal 75% success rate. We preserved the failed PACT trial because it taught us something important: PACT delivered the right context, but the receiving agent still implemented the wrong behavior. Coordination improves the odds; semantic tests still decide whether the code is correct.

How Codex and GPT-5.6 were used

Codex with GPT-5.6 was the primary engineering environment for PACT. It helped turn the original product hypothesis into the protocol, daemon, SDK, CLI, MCP bridge, provider hosts, Team server, benchmark runner, tests, infrastructure, documentation, and public site.

We also used Codex as a critical engineering partner rather than only a generator. It helped separate protocol semantics from transports, design crash-safe retries and credential boundaries, create baseline and passive-ledger controls, preserve failed experiments, identify weaknesses in early benchmark designs, and narrow our claims when the evidence did not justify a stronger conclusion.

GPT-5.6 is also part of the working experiment: PACT Bench runs a real Codex agent pinned to gpt-5.6-sol alongside Claude and records the model, tool, binary, fixture, commit, and dataset provenance for each trial.

Challenges and lessons

The hardest boundary was separating coordination correctness from implementation correctness. A delivered handoff can still be misunderstood, so PACT evolved from simple overlap alerts toward typed dependencies, evidence, required actions, and explicit resolution.

We also learned that file locks are too blunt for agent work. Two agents can edit different files and still collide through a shared contract, while two agents touching one file may be safe if their semantic intent is independent. That is why PACT models living project surfaces rather than treating filenames as the whole truth.

Finally, provider neutrality has to exist at the protocol and driver boundary, not in marketing copy. The Codex and Claude commands are thin launchers over the same host lifecycle, bounded context, and MCP tools.

What's next

Next we want to wire Team mode directly into both provider hosts, add a browser-based activity view, test more repositories and semantic scenarios, and publish the CLI under a stable package name. The long-term goal is an open substrate where agents can enter a project, understand the relevant state, collaborate safely, and leave without needing the conversation history that created it.

Try the live project at pact.nuanzs.space.

Built With

Share this project:

Updates