Menu

Safe Parallel Coding

Safe Parallel Coding lets several humans and AI agents work in the same repository without guessing who owns a file, route, schema, deployment, or release surface. Snipara stores the shared coordination state in the hosted project backend, then exposes it through companion commands, MCP tools, dashboard views, Git hooks, and GitHub checks.

Product boundary

Local state can help one machine coordinate itself. Hosted collaboration is the source of truth when multiple people, agents, terminals, CI jobs, and GitHub checks need the same presence, leases, conflict alarms, and expiry behavior.

The coordination loop

Start a session, claim the resources you are actively touching, run the guard before code moves, then heartbeat or release leases as the work changes.

snipara-companion collaboration start --summary "Refactor billing invite flow" --files apps/web/src/lib/billing.ts
snipara-companion collaboration claim --mode EXCLUSIVE --ttl-seconds 600 --resource FILE:apps/web/src/lib/billing.ts
snipara-companion collaboration guard --profile pre-commit --enforce
snipara-companion collaboration release --reason "Billing refactor done"

Surfaces

SurfaceWhat it doesCommand
PresencePublish who is working, on which branch, and on which files or resources.snipara-companion collaboration start
Resource leasesClaim files, routes, symbols, schemas, packages, docs, deploys, or custom resources.snipara-companion collaboration claim
Guard checksEvaluate overlap before edits, commits, pushes, handoffs, migrations, or releases.snipara-companion collaboration guard --enforce
Live statusRead active sessions, leases, recent guard events, and the last local guard result.snipara-companion collaboration status

Lease modes and TTL

Advisory modes can be long-lived when the team wants soft visibility. Blocking modes are time-bound so a crashed terminal or abandoned agent cannot hold the repository indefinitely.

ModeGuard effectTTL
WATCHInformational visibility.Optional
ADVISORYWarn other agents without blocking by default.Optional
REQUIRES_ACKRequire acknowledgement before continuing.Optional
EXCLUSIVEBlock unsafe overlap on the claimed resource.Required, defaults to 300s
HARD_BLOCKStop work until release, override, or expiry.Required, defaults to 300s

Enforcement details

TTL range

Explicit lease TTLs must be 30 to 86,400 seconds.

Heartbeat renewal

A heartbeat extends the lease expiry using the existing TTL window.

Expired leases

Expired active leases are surfaced as expired and stop acting as active blockers.

Hard blocks

Only owners, admins, internal automation, or API key automation can create HARD_BLOCK leases.

GitHub checks

Collaboration checks can publish only to the project's configured GitHub repository.

Payload limits

Requests limit file lists, resource lists, repository-relative paths, and JSON metadata size and depth.

Blocking hooks and GitHub checks

Companion can install managed pre-commit and pre-push hooks that call the hosted collaboration guard with --enforce. Production deployment and schema or package release workflows can run stricter profiles before code leaves the local worktree.

For GitHub, Snipara publishes a check named Snipara Collaboration Guard against the configured project repository. Clear or watch-only results pass; review, acknowledgement, or blocked results surface as required action or failure.

Emergency bypass is explicit: set SNIPARA_COLLABORATION_GUARD=0 only when a human intentionally accepts the risk.