You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Give agents a stable identity instead of a process PID #19
Every CLI invocation is a new process, so the "one lease per agent" rule
enforced in LeaseAcquisitionCoordinator (src/core/lease-acquisition-coordinator.ts:138)
and WaitQueue (RequesterAlreadyLeasedError) is really one lease per CLI
invocation — which is close to no constraint at all. Consequences:
The documented v1 invariant does not actually hold for CLI users.
pitlane status / list --leases show a bare pid, so an operator cannot
tell which agent holds what.
An agent that loses its lease id has no way to find its own lease.
Proposed change
Accept a stable identity: --agent-id <id> flag, falling back to PITLANE_AGENT_ID, falling back to today's pid-derived value so nothing
breaks for existing callers.
Thread it through the CLI and the MCP server (McpSessionOptions.requesterId
already takes it — just source it properly).
Show it in status and list --leases output in place of the raw pid.
Document it in docs/CLI.md and the README MCP section, including the
recommendation that each agent session use a distinct stable id.
Notes
This is the prerequisite for any future reconnect / lease-recovery flow, and it
is what makes the one-lease-per-agent error in #18 actionable — the message can
name the agent that already holds a device.
Acceptance criteria
--agent-id and PITLANE_AGENT_ID set the requester identity, with the
documented precedence.
Two CLI invocations with the same agent id hit REQUESTER_ALREADY_LEASED;
with different ids they do not.
Activity