resurrect
Restores worktree windows after a tmux or computer crash. Uses persisted agent state files to detect which worktrees had active agents before the crash, then reopens them with --continue to resume agent conversations.
bash
workmux resurrect [--dry-run]Options
--dry-run: Show what would be restored without actually doing it.
How it works
- Reads agent state files from
~/.local/state/workmux/agents/ - Filters to the current multiplexer backend and instance
- Matches each state file's working directory to a git worktree in the current repo
- Skips worktrees that are already open, no longer exist, or are the main worktree
- Opens each matched worktree with
--continueto resume the agent conversation - Cleans up consumed stale state files
Examples
bash
# Preview what would be restored
workmux resurrect --dry-run
# Restore all worktrees that had agents running
workmux resurrectExample output
continue-flag -> restoring
dashboard-fix -> skipping (already open)
auth-refactor -> restoring
(2 state file(s) from other projects ignored)
✓ Restored 2 worktree(s): continue-flag, auth-refactor