OpenRig

Continuity: restarts, compaction and handover

An OpenRig agent isn't one conversation; it's a seat that keeps its name, its role, its tasks and what it has learned. Close the window and it keeps working in tmux. With managed compaction on, a Claude agent whose context fills up compacts and picks up where it was. After a stop or reboot, rig up <rig-name> --existing brings the whole team back by name. When a conversation has run its course, a fresh agent takes over the seat with a handover from the last one.

Bring a team back after a stop or reboot

rig down tries to save a snapshot before stopping the rig. rig up <rig-name> --existing restores it from an automatically selected usable snapshot and reports how each agent came back.

rig down my-rig --snapshot
rig up my-rig --existing

rig up tells you how each agent came back: resumed, rebuilt, or started fresh. If one can't be resumed, it asks before starting that agent fresh (the default answer is no). To start particular agents fresh on purpose, name them:

rig up my-rig --existing --fresh dev.qa

Before a planned reboot, rig restore-check tells you whether each running rig would come back, and what's in the way if one wouldn't. rig restore <snapshotId> --rig <rigId> restores a specific snapshot; stop the rig with rig down first.

rig restore-check --rig my-rig

Keep an agent going when its context fills up

Turn on managed compaction and OpenRig watches each Claude agent's context. Before it fills, the agent writes a restore map of what it's doing and why. OpenRig then compacts it at the next quiet moment and has it read the map back, so it carries on instead of starting cold.

  • rig compact-plan shows which Claude agents are getting close.
  • rig compact dev-impl@my-rig runs the same sequence for one agent now.
  • rig compact dev-impl@my-rig --cancel calls it off before /compact is sent.

Hand a seat to a fresh agent

When a conversation has run its course, rig handover puts a new agent in the same seat. The outgoing agent writes a recap first. The seat keeps its name, its links to other agents and its tasks.

rig handover dev-impl@my-rig --reason "context wall" --dry-run
rig handover dev-impl@my-rig --reason "context wall"

--dry-run shows the plan. --source picks where the new agent starts:

  • fresh, the default;
  • fork:<id>, a fork of the current conversation;
  • rebuild, from the seat's saved files.

Other ways to carry an agent forward

  • Switch runtimes: rig seat set-runtime moves an agent between Claude Code and Codex. It keeps its name, tasks and place, and the new runtime starts from a handover.
  • Agent images: rig agent-image create <session> saves a productive agent's state, so new seats can start from it.
  • Restore packets: rig restore-packet write saves what an agent knows to a portable file, for moving it somewhere new.
  • Past conversations: rig seat history --rig <id> --node-id <id> lists the Claude and Codex conversations a seat could resume.
  • Settings for the next launch: rig seat set-cwd, set-effort and set-model change what an agent uses the next time it starts.
  • Seat state: rig seat status <seat> shows a seat's handover state.

Names: rig handover and rig seat take an agent's address, such as dev-impl@my-rig. rig launch and --fresh take its id, such as dev.impl. Lifecycle has the full mapping.

Where to go next