Documentation / local quickstart

Coordinate your first local agent.

This path uses one Git repository, the local PACT daemon, and a Codex or Claude host. It is the shortest working path through PACT 0.1.

Before you start

  • Node.js 22 or newer
  • Git and an initialized repository
  • Codex CLI or Claude Code installed and authenticated
# From the PACT source checkout
npm install
npm link
pactctl version

1. Initialize the project

Run this once at the root of the repository you want agents to modify.

cd /path/to/your-project
pactctl init --name your-project
pactctl doctor

Commit .pact/project.json. PACT keeps runtime credentials, cursors, sessions, and local state under the ignored .pact/state/ directory.

2. Start the daemon

pactctl up

Keep that terminal open. The reference daemon listens on the discovered local endpoint.

3. Launch an agent host

Codex

pact-codex \
  --objective "Add token rotation" \
  --surface "file://src/auth" \
  --surface "contract://SessionResponse" \
  -- "Implement the change and update tests."

Claude

pact-claude \
  --objective "Update the UI consumer" \
  --surface "file://src/ui" \
  --surface "contract://SessionResponse" \
  -- "Implement the change and update tests."

If no prompt follows --, the objective is also used as the provider prompt. The shared host owns leases, synchronization, observation, checkpoints, and leave.

4. Add a second worktree

Separate worktrees make concurrent changes attributable to the correct agent.

git worktree add ../your-project-codex -b agent/codex
git worktree add ../your-project-claude -b agent/claude

pact-codex --workspace ../your-project-codex --objective "Implement producer"
pact-claude --workspace ../your-project-claude --objective "Update consumer"