Worktrees & Daemons
Squeal is built for multi-worktree, parallel-agent workflows.
One daemon per worktree, one shared store
Section titled “One daemon per worktree, one shared store”- Each Git worktree runs its own lightweight background daemon, writing logs to
<git-common-dir>/squeal/logs/daemon-<worktree-id>.log(rotated at 4 MiB, ~8 MiB retained). - All worktrees of a repository share one content-keyed store under
<git-common-dir>/squeal/. - When worktree B has identical file inputs to a test file that worktree A already validated, Squeal inherits that result immediately —
squeal status --fullreports exactly how many current results were inherited and from which worktree and commit. - A daemon idles out automatically after
daemon.idleExitMinutes(default60) with no registered session, and closes idle runner processes afterrunner.hostIdleMinutesto free RAM.
Inspect all running daemons and runner hosts (local or remote):
squeal psRemoving a worktree cleanly
Section titled “Removing a worktree cleanly”Before deleting a worktree, stop its daemon so no background runner process holds open file handles in the directory:
squeal stop <worktree-path>squeal stop cancels in-flight runs, terminates the daemon and every child process it spawned, and exits 0 once nothing remains.
To keep a daemon stopped across subsequent edits and Git operations until you explicitly start it again:
squeal stop --until-startHolding a new worktree before an agent starts
Section titled “Holding a new worktree before an agent starts”Orchestrators creating worktrees for worker agents (where validation should stay paused until ready) should follow this exact order:
- Create the worktree (
git worktree add <child-root>). - Run
squeal stop --until-start <child-root>(verify exit0and empty stderr). - Optionally verify with
squeal status --jsonin the child root (daemon.stoppedanddaemon.untilStartaretrue). - Start the agent session — hooks will not start a daemon while held.
- Release the hold when ready with
squeal start <child-root>.
Holding validation around a manual gate
Section titled “Holding validation around a manual gate”When you need to run a heavy manual gate or browser reproduction without Squeal competing for CPU or shared test fixtures (like a globalSetup lease), use squeal hold instead of squeal stop:
squeal hold -- pnpm run e2esqueal hold cancels interruptible Vitest runs, closes the slow-tier Vitest instance (triggering globalSetup teardown), keeps recording file edits as revisions, and automatically resumes queued validation once your command exits (capped by --max, default 3h).