Archive AI agent sessions before your control surface turns into a pile of half-remembered runs.
Claude Code and Codex sessions can accumulate quickly: one investigation, one implementation pass, one review pass, one abandoned experiment, one Switchboard run, one follow-up from your phone. If every session stays open forever, the active list stops telling you what needs attention.
Archiving solves a specific problem. It clears completed or inactive work from the active surface without treating the history as disposable. The transcript, context, and review trail may still matter later.
Junction includes archive controls because agent lifecycle management is part of the product, not an afterthought. The Free plan includes two active or open chats. Core expands that to unlimited open chats. Either way, archiving is a useful discipline.
What Archiving Is For
Archiving is for sessions that no longer need active attention.
Good candidates:
- completed runs with reviewed diffs,
- investigations that produced a useful answer,
- abandoned attempts you may want to inspect later,
- merged worktree sessions,
- old review passes,
- sessions waiting on no further action.
Poor candidates:
- active runs waiting for approval,
- sessions with unreviewed diffs,
- branches that still need a pull request,
- failed runs where the failure has not been understood,
- work you may need to continue in the next hour.
The point is not to hide work. The point is to keep active work honest.
Active vs Archived
Think of the session list as two separate views:
| State | Meaning |
|---|---|
| Active | A run may need attention, continuation, approval, or review. |
| Archived | The run is retained for history, but it should not compete with live work. |
That distinction matters most on the Free plan, where only two active or open chats are included. If you keep old work open, you burn limited active space on sessions that no longer need it.
On Core, the limit is removed, but the habit still matters. Unlimited open chats can become unlimited clutter unless you archive intentionally.
What To Check Before Archiving
Before archiving a session, ask:
- Is the agent stopped or complete?
- Did I review the final diff?
- Did verification pass, fail, or remain unrun?
- Is there an open branch or pull request?
- Did the session create local files that need cleanup?
- Would a future reviewer understand why this was archived?
If the answer is unclear, leave it active and resolve the ambiguity first.
For example, do not archive a session just because the transcript is long. Archive it because the work has a clear status.
A Useful Archive Summary
Before you archive, leave yourself a compact summary:
Outcome:
- Investigated checkout summary failure.
- Found discount row was omitted from expected total.
- No code changes kept.
Verification:
- Focused test still fails.
Next step:
- Start a new implementation chat on branch fix/checkout-discount-total.That kind of note makes history useful. It tells future you whether the session contains a diagnosis, a discarded path, or a completed change.
How Archiving Supports Review
Agent history is often review evidence.
The transcript can explain:
- why a change was made,
- what commands ran,
- which approvals were requested,
- what the agent tried before the final patch,
- why a branch was abandoned,
- how a failure was diagnosed.
You do not want all of that in your active work list. You also do not want to lose it.
Junction keeps archived history available so you can inspect prior runs without letting them crowd the current control surface. That pairs naturally with Resume AI Agent Sessions Across Devices and Inspect AI Agent Runs Without Terminal Hunting.
Archiving Worktrees and Sessions
If an agent run used a worktree, archiving has an extra dimension: local files may need cleanup.
Do not treat worktree cleanup as the same thing as forgetting the run. A completed worktree may be safe to archive after the pull request is merged or abandoned. A dirty worktree may need review before cleanup. A worktree with a useful uncommitted patch should not disappear just because the chat feels old.
Use a simple rule:
- preserve history,
- clean up local work only when you understand the diff,
- keep branch and pull request state visible until review is done.
Tradeoffs
Archiving too early can hide unfinished work. Archiving too late makes the active surface noisy.
The right balance is status-driven:
- Active means "this may require a decision."
- Archived means "this is history unless I intentionally reopen it."
That is especially helpful on mobile. A small screen should prioritize sessions that need attention, not every run you have ever started.
When To Upgrade Instead
If you are constantly archiving useful active work just to stay under the Free plan's two active/open chat limit, the workflow may have outgrown the plan. Core supports unlimited daemons and open chats. Switchboard adds Linear automation for issue-to-pull-request workflows.
Archiving should be a cleanliness habit, not a workaround for a workflow that needs more room.
Start with the Junction setup guide if you have not paired a daemon yet. Compare the current chat and daemon limits on pricing when active work no longer fits the Free plan.