osstmux-ide is open source, built at Prototyper.Learn more
tmux-ide

Restore & Resume

Rebuild your whole fleet after a tmux server death — sessions, windows, layouts, cwds, titles, and agent conversations

Restore & resume

A tmux server death shouldn't cost you an afternoon. While tmux-ide is running, the chrome updater continuously writes a snapshot of your fleet to ~/.tmux-ide/snapshot.json. If the server dies, tmux-ide restore rebuilds everything it recorded.

What comes back

tmux-ide restore

For each session in the last snapshot, restore rebuilds:

  • every window,
  • the split layout of each window,
  • per-pane working directories,
  • per-pane titles, and
  • re-adopts the sessions that were adopted (the dock returns).

If a session already maps to a registry project with a project config, restore relaunches from that config instead of a raw rebuild — the config is the source of truth.

Safety first

Restore never clobbers work in progress:

  • An already-live session with the same name is skipped, never overwritten.
  • Recorded pane commands are not auto-run. By default a rebuilt agent pane is a plain shell in the right directory with its title restored — you decide what to relaunch. Pass --run-commands to replay the recorded commands.

Preview the plan without touching tmux:

tmux-ide restore --dry-run
tmux-ide restore --dry-run --json

Resume agent conversations

The strongest form of recovery brings the conversations back, not just the panes. An agent pane that carries a recorded @agent_session_id relaunches, under --resume-agents, with its kind's native resume invocation — reviving the actual conversation instead of opening a fresh shell.

tmux-ide restore --resume-agents

You can make this the default in ~/.tmux-ide/config.json:

{
  "restore": {
    "resumeAgents": true
  }
}

Support per agent

Two things have to be true for a pane to resume: tmux-ide must know the kind's resume invocation, and the pane's session id must have been captured while the agent ran. Honest status of both:

AgentResume invocationSession-id capture
Claude Codeclaude --resume <id>automatic once tmux-ide integration install claude is set up (hooks)
Codex CLIcodex resume <id>automatic — the updater reads the session's own rollout file
Cursor CLIcursor-agent --resume <id>automatic — the updater reads the CLI's chat store
opencodeopencode --session <id>automatic once tmux-ide integration install opencode is set up (plugin)
Copilot CLIcopilot --resume=<id>not automatic (no stable capture surface yet) — self-report works, see below
gemini, aider, goose, ampno verified native resume invocation

Check what's active on your machine:

tmux-ide integration status

Any agent not listed can still join: the agent contract is open. An agent that writes its own id resumes like the rest (given a known invocation for its kind):

tmux set-option -p @agent_session_id <its-session-id>

Capture never overwrites: an id stamped by an integration (or by the agent itself) is left alone. Codex/Cursor capture runs inside the chrome updater, so it is active whenever any session is adopted.

Snapshot cadence

How often the snapshot is written is part of the updater config in ~/.tmux-ide/config.json:

{
  "updater": {
    "tickMs": 2000,
    "snapshotEvery": 15
  }
}

A snapshot is written every snapshotEvery ticks (default: every 15 ticks of 2s ≈ every 30 seconds). See Theming & config.

See also

On this page