Skip to content

wip volume

slidict-ai-team[bot] edited this page Nov 28, 2026 · 1 revision

wip volume

Creates, inspects, reconciles, mirrors into, and destroys declared volumes — named storage entries declared under volumes: in wip.yml for use with sandboxes.

wip volume create NAME
wip volume status NAME
wip volume destroy NAME
wip volume reconcile NAME
wip volume sync NAME

wip sandbox create already creates the volumes its sandbox references and wip sandbox destroy reconciles them. Use wip volume when you want to prepare, inspect, mirror into, or remove declared storage directly. Loading wip.yml and running wip config never touch storage.

See Sandboxes for the resource_namespace: and volumes: declaration syntax.

Operations

Command What it does
create NAME Creates a new backend volume generation if absent, or reuses ownership- and policy-verified storage without resetting data
status NAME Prints logical name, existence, persistence policy, backend generation name, reference count, and observed-use flag
destroy NAME Deletes unreferenced, ownership-verified storage — including persistent: true volumes. Missing storage succeeds
reconcile NAME Observes usage; deletes an unreferenced persistent: false volume only after recorded use, and keeps persistent or still-referenced volumes
sync NAME Mirrors the host directory declared in volumes.<name>.sync into an existing volume using a throwaway container

Every operation requires the volume to be declared in wip.yml. Removing a volumes: entry never deletes existing backend storage.

Output of wip volume status

status prints one tab-separated line:

$ wip volume status project
project	exists	persistent	wip-v-9f1c...	references=1	used=True

When no backend generation exists yet:

$ wip volume status scratch
scratch	not found	ephemeral	-	references=0	used=False

The six fields are: logical name, exists or not found, persistent or ephemeral, backend generation name (or -), references=<count>, and used=<True|False>.

references counts every non-deleted container mounting the volume — including stopped containers and containers managed outside wip.

Mirroring a host directory (wip volume sync)

If a volume declares volumes[].sync, wip volume sync NAME runs one rsync pass from a throwaway container (wslc run --rm) that mounts the host directory read-only at sync.mount (default /host-src) and the volume at volumes[].mount:

volumes:
  - name: project
    persistent: true
    mount: /workspace
    sync:
      source: .
      image: alpine-rsync
      exclude: [.git, node_modules]
wip volume create project
wip volume sync project
  • Relative source paths are expanded against the directory holding wip.yml, not the current working directory, so the mirror covers the same tree from any subdirectory. The directory must exist before sync runs.
  • Storage is not created implicitly. Run wip volume create NAME (or wip sandbox create) first; syncing an absent volume fails.
  • Running sandboxes keep running. The mirror runs in its own throwaway container (30-minute timeout) labeled io.slidict.wip.mirror, so observing the mirror container does not mark an ephemeral volume as used for reconcile — though it still counts as a reference while running.
  • delete: true is the default. Files written inside the volume that are absent from the host source are removed on the next mirror pass. Set delete: false or exclude: to keep them.

Ephemeral usage tracking and .wip/volume-usage

wip records observed volume usage under .wip/volume-usage/ next to wip.yml, keyed by each volume's unique backend generation name (wip-v-<hash>-<uuid>). Add **/.wip/volume-usage/ to .gitignore in repositories that declare volumes.

  • reconcile is a no-op for persistent: true volumes, for volumes that have never been observed attached to a container (used=False), and for volumes with any remaining reference (including stopped containers).
  • Once an ephemeral volume has been observed in use (used=True) and every referencing container has been removed (references=0), reconcile deletes that generation and forgets its usage marker. The next create allocates a fresh generation.
  • If the usage journal was lost or an attach was never observed, reconcile retains the volume rather than guessing; use wip volume destroy NAME to delete it explicitly.

Failure cases

Failure Cause and recovery
Unknown volume: NAME NAME is not declared under volumes: in wip.yml.
Volume NAME: still referenced by containers; remove every referencing container first destroy refuses any volume still mounted by a running or stopped container. Destroy referencing sandboxes (or remove external containers) first.
Volume NAME: no sync is declared; add volumes.NAME.sync to mirror a host directory wip volume sync called on a volume without a sync: block.
Volume NAME: storage does not exist yet; run wip volume create first wip volume sync does not create volumes; run wip volume create NAME first.
Volume NAME: sync source directory does not exist: PATH volumes.NAME.sync.source resolves to a missing directory (checked before mirroring so --delete cannot empty the volume).
Volume NAME: ownership/persistence mismatch; refusing to adopt or delete Backend labels disagree with wip.yml (for example, persistent: was flipped after creation). Restore the original declaration or inspect backend metadata manually.
Volume NAME: multiple generations exist; do not automatically choose or delete one More than one backend volume matches this declaration's prefix. Inspect and resolve manually; wip never guesses which generation to delete.

Related

Clone this wiki locally