Skip to content
venizia.ai

Documentation · VULCAN

vulcan project clean ​

Everything an agent creates while it works lives under the project's gitignored .agents/local/ (rule V-B-08). vulcan project clean lists what is there and removes it when its time has come. It is a dry run unless you add --yes, and it only ever touches .agents/local/ of the project it runs in.

Run it at the project root: it works on the .agents/local/ of the current folder and does not search upward (board and event do).

FlagScopeWhat it takes
--tmp (the default)tmp/every stale item (older than a day)
--worktreesworktrees/a worktree that is merged or gone and safe to lose
--clonesclones/clones stale for two weeks
--cachecache/what atlas fetched; it rebuilds
--include-freshtmp/, clones/also the items not stale yet
--allthe four abovenever reports/, prototypes/, events/, release-candidates/ or the profile
--eventsthe event logonly when named: the day files past the limits
--reports, --prototypes, --profilereports/, prototypes/, profile.json (your answers only, as vulcan profile reset: this machine's keys stay)only when named; they are kept until you delete them
--release-candidatesrelease-candidates/only when named: a folder whose version is tagged
--yesremoves what the dry run listed

What each flag takes ​

  • --tmp: every item that is stale (older than a day): scratch, temporary files, logs, subagent output. An item that is not stale yet may belong to a session that is running now: it is kept and the output says so, until you add --include-fresh. tmp/claude-<uid> (Claude Code's background task output) is never removed. Also the com.google.Chrome.* and org.chromium.Chromium.* folders (a leading dot too) a browser left directly under .agents/local/, once they are an hour old (a younger one may belong to a running browser and is kept).
  • --worktrees: a worktree whose branch is merged into the branch checked out at the project root, into origin/develop or into the default branch of origin, or no longer exists. It must hold no uncommitted or untracked file and no ignored file a build cannot make again (.env, a database, a key: the output names it; node_modules, dist, .turbo, coverage, .cache and *.tsbuildinfo do not count), and its branch must have a commit of its own (a new branch is kept as "no commits of its own yet"). A folder git does not list is taken too. An unmerged worktree, one on a detached HEAD and one with uncommitted work are kept, and the reason is printed.
  • --clones: clones of other repositories that are stale (older than two weeks); a younger one is kept like a fresh tmp/ item.
  • --include-fresh: also takes the items of tmp/ and clones/ that are not stale yet; use it when no session is working in the project. It never takes tmp/claude-<uid>.
  • --events: only the day files the limits of events (maxAgeDays, maxFiles, maxSize) say to remove, in the folder the project's board.events.dir names (else events/). Today's file, later ones and the files within the limits are kept, and the output says so. A log outside the project is listed by its whole path, and only a yyyy-mm-dd.jsonl file directly in that folder is ever removed.
  • --release-candidates: only a folder named as a version (1.2.3, v1.2.3, 1.2.3-rc.1) whose tag exists, with or without the v (the folder 1.0.0 goes when the tag v1.0.0 exists, and the other way round). A candidate not released yet, or a name that is not a version, is kept, and the reason is printed.

A worktree is removed with git worktree remove, then git worktree prune. A symlink under .agents/local/ is unlinked and never followed; a path that does not resolve to a place inside .agents/local/ is refused. If .agents or .agents/local is a symlink, or .agents/local resolves outside the project, nothing is scanned or removed. A scope folder that is a file or a link is skipped. An item's age is its newest change anywhere inside it, not its folder's own time. For a worktree on a deleted branch git keeps no commit to compare with, so work that was staged but never committed there cannot be told from the checkout itself.

The dry run lists each item with its size and age, then what it would remove:

text
$ bun node_modules/.bin/vulcan project clean
vulcan project clean: dry run, nothing is removed (add --yes)
  tmp/job-2  2.9 MB  3d  stale
  kept tmp/job-1  fresh (0m): may be in use; --include-fresh removes it
would remove 1 item(s), 2.9 MB

With --yes it removes the stale ones and keeps the rest:

text
$ bun node_modules/.bin/vulcan project clean --yes
vulcan project clean: removing
  tmp/job-2  2.9 MB  3d  stale
  kept tmp/job-1  fresh (0m): may be in use; --include-fresh removes it
removed 1 item(s), 2.9 MB

vulcan project doctor warns about an item that has outlived its use (a tmp/ item older than a day, a clone older than two weeks, a worktree on a merged or gone branch) with the command that clears it.

The automatic clean ​

You rarely need this command for the safe part: the session-start hook runs it for tmp/, browser leftovers, event files and tagged release candidates, at most once a day (the automatic clean). It never removes a worktree or a clone; those need --worktrees or --clones with --yes.

See also ​

Exit codes ​

CodeWhen
0the dry run, a successful removal, or nothing to remove
1an item could not be removed (named on stderr), or an unknown flag