Manage Claude Desktop sessions
Claude Desktop stores its Claude Code sidebar separately for each signed-in account. Switching accounts can make existing sessions disappear from the sidebar even though their transcripts still exist.
harn claude-desktop can mirror those sidebar entries across accounts. It can
also archive completed entries after Harnery records their task lifecycle as
done.
Before you begin
Section titled “Before you begin”- Run the command on the machine where Claude Desktop stores its session index.
- Initialize Harnery in the project whose lifecycle events you want to read.
- Fully quit Claude Desktop before relying on a changed sidebar. Closing the window usually leaves the app running in the system tray.
Keep sessions visible after an account switch
Section titled “Keep sessions visible after an account switch”-
Inspect the account directories Harnery found.
Terminal window harn claude-desktop accountsharn claude-desktop sessions -
Preview the mirror plan. The command changes nothing without
--yes.Terminal window harn claude-desktop mirror --all -
Apply the plan.
Terminal window harn claude-desktop mirror --all --yesUse
--to <account-prefix>or--from <account-prefix>when you want a one-way copy. Use--session <id-or-title>to mirror one session. -
Fully quit Claude Desktop and relaunch it.
Mirroring copies sidebar entry files. It does not copy or fork the transcript. Both accounts point to the same underlying Claude Code session, so do not open and drive that session from two accounts at the same time.
Archive completed sessions
Section titled “Archive completed sessions”-
Mark the Harnery task done from its agent session.
Terminal window harn agents lifecycle done --reason "implementation and verification complete" -
Preview the cleanup plan.
Terminal window harn claude-desktop tidyHarnery maps each desktop entry to its session and reads the newest durable lifecycle event. It reports active, blocked, unmatched, and already archived entries without changing them.
-
Apply the archive plan.
Terminal window harn claude-desktop tidy --yesLimit the batch with
--account <uuid-prefix>when needed. -
Fully quit and relaunch Claude Desktop.
Applied cleanup changes only isArchived and replaces each entry atomically.
Repeating the command is safe; already archived entries become skips.
Handle older hand-labeled sessions
Section titled “Handle older hand-labeled sessions”Older sessions may have a [DONE] title but no lifecycle event. Normal cleanup
skips them because a title is editable and cannot prove completion.
Preview those entries only when you intend to include that history:
harn claude-desktop tidy --include-legacy-prefixharn claude-desktop tidy --include-legacy-prefix --yesThe compatibility flag never overrides a matching active or blocked
lifecycle event. A [BLOCKED] title never qualifies for cleanup.
Troubleshooting
Section titled “Troubleshooting”No desktop data directory was found
Section titled “No desktop data directory was found”Pass the directory explicitly:
harn claude-desktop accounts --data-dir <path>Harnery normally checks ~/Library/Application Support/Claude on macOS,
%APPDATA%\\Claude on Windows, and ~/.config/Claude on Linux. A CLI running
under WSL also scans Windows user profiles mounted under /mnt/c/Users/.
A completed entry is reported as unmatched
Section titled “A completed entry is reported as unmatched”The desktop row must carry a cliSessionId that maps to a Harnery session in
the current project’s active or rotated event ledgers. Run the command from the
project that recorded the lifecycle event. Do not rename the sidebar entry as a
substitute for that evidence.
The sidebar did not change
Section titled “The sidebar did not change”Quit the Claude Desktop process from its tray menu, then relaunch it. The window close button may only hide the application.