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
Close out M5 with its two non-TUI items.
Auto-spawn (PRD §7.3): any `vault` verb now starts `vault-agent` itself
when the socket is dead (missing file or stale connection-refused
socket; other errors, e.g. permissions, still surface directly). New
vault-cli/src/spawn.rs locates the agent via $VAULT_AGENT_BIN, then a
vault-agent sibling of the `vault` binary, then $PATH; starts it in its
own process group (--socket passed explicitly, stdin/stdout null,
stderr appended to agent.log beside the socket in the 0700 runtime
dir); and poll-connects until the agent accepts (2 s deadline, 25 ms
interval), reusing the first accepted stream. A new global
--no-auto-spawn flag opts out per call, and stop-agent never spawns —
stopping a dead agent must not start one. A small
Endpoint { socket, auto_spawn } context replaces the bare &Path through
the command handlers.
Headless gate (PRD G6): the `vault` bin now carries
required-features = ["cli"], making the documented server install
literal: cargo install --path crates/vault-cli --no-default-features
--features cli (pair with vault-agent --no-default-features to drop the
clipboard's X11/Wayland tree). A new CI `headless` job builds both
combos so the gate can't rot.
Docs trued up: README Status (was still "M0 scaffolding only") and the
headless install section; vault-agent's "run via nohup" module doc;
CLAUDE.md's agent/cli/tui bullets and milestone state.
Known limitation (tracked in CHANGELOG): two racing CLI invocations can
each spawn an agent; the second bind steals the socket path and the
first agent idles until its lock. Benign at single-user posture.
Tests: binary-resolution precedence (override > sibling > $PATH, empty
override ignored), dead-socket error classification, and poll-loop
behavior (picks up a late listener, gives up at the deadline). Verified
live end-to-end: spawn-on-first-verb, silent reuse, agent.log placement,
--no-auto-spawn, and stop-agent-never-spawns.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments