Archiving a session in Braide is a two-stage story:
The two stages are complementary: archive frees the big disk cost the moment you stop actively working on a session; the pruner finalises lightweight records once they've sat untouched long enough. This page covers both — and the unarchive path that brings an archived session back to a working state.
Open a session's context menu in the sidebar (the kebab menu) and choose Archive. The session moves to the archived list and three things happen on disk:
~/.braide/projects/<project-id>/sessions/<session-id>/worktree/ is gone after archive completes. This is what frees the big disk: node_modules, build output, and the checked-out source tree are all reclaimed.In the session view, the terminal, file browser, and prompt input panes are replaced by a small archived affordance panel — see The Archived Session Affordance below.
From the archived session's context menu, choose Unarchive (or click Unarchive session in the affordance panel). Braide reverses the archive:
acp-session-archived/<id> to acp-session/<id>.node_modules are not preserved (see Limitations below), the setup command needs to repopulate them.The first three steps complete in a few seconds; the setup command runs in parallel with the agent handshake, exactly as it does on a new session.
This section is for users who want to understand what Braide is doing to git on their behalf, or who need to dig things out manually in a recovery scenario.
When a session is archived, its branch is renamed from acp-session/<id> to acp-session-archived/<id>. Git keeps every commit on that branch reachable, so nothing in the session's history is at risk of garbage collection.
The anchor branch is what unarchive uses to recreate the worktree — it renames the branch back and runs git worktree add against it. The session's recorded last-commit SHA is checked against the recreated worktree's HEAD as a defence-in-depth assertion that the right commit is checked out.
If you ever need to inspect an archived session's history without unarchiving it, the branch is available in your project's repository:
git log acp-session-archived/<session-id>
git diff main...acp-session-archived/<session-id>
Uncommitted changes (anything git status would show — staged, unstaged, or untracked) are captured at archive time via git stash push -u and immediately moved off the shared stash stack into a session-scoped ref:
refs/braide/wip/<session-id>
This dedicated ref means your archived session's WIP is never visible in git stash list and cannot be accidentally popped by a git stash pop in your project root. The ref's existence is the source of truth for "this archived session had uncommitted changes" — there is no parallel metadata flag.
On unarchive, Braide applies the ref to the recreated worktree and deletes the ref:
git stash apply refs/braide/wip/<session-id>
git update-ref -d refs/braide/wip/<session-id>
git stash push -u, which captures untracked files but not files matched by .gitignore. That means:
node_modules, .venv, target/, dist/, and similar build output are lost — and re-created by the worktree setup command on unarchive..env files and other ignored local-only configs are lost. Secrets you stored only in an ignored file must be re-entered after unarchive. This is a deliberate limitation — using git stash push -a (which would include ignored files) would bloat archive storage with regenerable build artefacts.If the stash apply on unarchive hits a conflict, Braide does not roll back automatically. Instead:
refs/braide/wip/<session-id> ref is preserved — your uncommitted work is still recoverable as a git object even if the apply made a mess.failureReason: "wip restore conflict", surfaced in the affordance with a resolve-and-drop instruction.To finish recovery once you've resolved the conflict markers manually:
git update-ref -d refs/braide/wip/<session-id>
This deletes the now-redundant ref. The session is fully restored.
Archived sessions still consume some disk — the session record, transcripts, and the git refs that preserve history — but the per-session footprint is small. The background pruner permanently deletes archived sessions older than a configured number of days.
It helps to think of archive and retention as two distinct disk-reclaim tiers:
| Stage | What it frees | Recoverable? |
|---|---|---|
| Archive | The worktree directory (often the dominant per-session cost) | Yes — via Unarchive |
| Pruner (permanent delete) | Session record, transcripts, and the acp-session-archived/<id> and refs/braide/wip/<id> git refs | No |
Archive is reversible and runs the moment you stop working on a session. The pruner is irreversible and runs in the background after retention has elapsed. You can keep archived sessions indefinitely by enabling retention protection on individual sessions.
Archive retention is a per-project setting.

Click the Prune now button to immediately run the pruning logic for the current project, rather than waiting for the next hourly sweep. While running, the button shows Pruning… alongside a progress bar and a checked/total counter (plus a running count of sessions pruned). When complete, a result message is shown:
Individual archived sessions can be protected from automatic pruning regardless of their age. This is useful for sessions you want to keep as reference — for example, a session with an important architectural decision or a complex debugging investigation.
To protect a session, toggle its retention protection option from the session's context menu. Protected sessions are skipped during both the automatic hourly sweep and manual "Prune now" operations. Because archive already removed the worktree, retention protection is now a low-disk way to keep a session recoverable forever rather than the heavy frozen-worktree state it used to be.
When you open an archived session, the usual terminal, file browser, and prompt input are replaced by a small panel that names the situation and offers the resolving action. The panel shows:
The transcript above the affordance stays visible as read-only history. If a previous unarchive hit a stash-apply conflict (see Recovering from a Stash-Apply Conflict), the affordance shows the failure reason and the manual-recovery instruction instead of the Unarchive button.