CLI reference
heddle agent
Shippedheddle agent [OPTIONS] <COMMAND> Agent reservation and one-shot orchestration API. The writer-lease protocol orchestrators use to coordinate parallel writers on one repository. Entirely local — no server involved.
Output text (default)
The binary's own framing, verbatim: heddle agent reserve|capture|ready|release|list|heartbeat is the stable JSON contract orchestrators use to coordinate parallel writers. heddle daemon remains the distinct FUSE mount control plane. There is no agent serve, no agent status and no agent stop — agent is not a daemon and does not listen on a socket. Every subcommand is local file-backed coordination under .heddle; none of it does network I/O.
The protocol. heddle agent reserve --thread atomically reserves a thread for one writer and returns a lease_id and a bearer token. Every downstream verb — heartbeat, capture, ready, release — requires both, as --lease . Prefer the HEDDLE_RESERVATION_TOKEN environment variable to --token when process-list visibility matters.
The lease is a five-minute heartbeat lease. agent heartbeat, agent capture and agent ready all renew a current one. --hold-for-pid adds an early-death signal for a long-lived orchestrator process, but PID liveness does not replace heartbeats. release --status closes the lease as complete or abandoned.
Actor session IDs identify provenance; they do not grant writer authority. The token is the authority. (Relatedly: HEDDLE_SESSION_ID and HEDDLE_SESSION_SEGMENT are not implemented — do not rely on them.)
Output is not JSON-only. Every agent subcommand takes the global --output, and text is the default there as everywhere else. Pass --output json to get the contract.
Beyond the lease verbs, agent carries four family surfaces: task (the local delegation record), fanout (plan and start native fan-out lanes), presence (attribution and work context for the active worker — agent presence explain is the first place to look when Heddle attributed activity to the wrong agent), and provenance (provider/model/policy epochs).
Examples
The canonical multi-agent flow
bash$ heddle start feature/auth --task "Implement auth middleware"$ heddle agent reserve --thread feature/auth# → a lease_id and a bearer token; export HEDDLE_RESERVATION_TOKEN rather than passing --token$ heddle agent heartbeat --lease <LEASE> --token <TOKEN>$ heddle agent capture --lease <LEASE> --token <TOKEN> -m "Implement auth middleware"$ heddle agent ready --lease <LEASE> --token <TOKEN>$ heddle agent release --lease <LEASE> --token <TOKEN>$ heddle land --thread feature/authSee who holds what
bash$ heddle agent list --alive-only --output jsonSee also
Subcommands
agent reserveAtomically reserve a thread for one writer; returns a lease_id and a bearer tokenagent heartbeatUpdate reservation heartbeatagent captureCapture under a token-authenticated writer leaseagent readyMark a reservation's thread ready for integrationagent releaseRelease a reservation (status: complete | abandoned)agent listList agent reservations (optionally filtered to alive ones)agent taskManage local agent task assignments: create, list, show, updateagent fanoutPlan and start native fan-out lanes: plan, startagent presenceInspect attribution and work context: list, show, explain, completeagent provenanceRecord provider/model/policy provenance: begin, segment, end, list, show