Skiff

Keep agent sessions running.

A coding agent like Claude Code or Codex runs inside a terminal. Close that terminal window and the agent stops, often in the middle of a task. This guide covers the ways to keep an agent running when the window goes away, and what each way cannot do.

Updated 2026-10-06

Why the agent stops

The agent is a child process of the terminal. When the window closes, the terminal sends it a hangup signal and it exits. The same happens to an agent on a remote machine when the SSH connection drops. To survive, the agent needs a parent that outlives the window.

tmux

tmux runs a server process that owns the terminals. You attach a window to it, and when the window closes, the server and the agent keep running.

# Start a named session and run the agent in it
tmux new -s agents
claude

# Detach: press Ctrl+B, then D. The agent keeps working.

# Later, from any terminal, attach again
tmux attach -t agents

tmux works over SSH and on any server. The cost is the keys and the layout, which you manage yourself. GNU Screen works the same way with different keys. Zellij is a newer multiplexer with on-screen hints and its own zellij attach.

Run the agent without a terminal

For a task that needs no back and forth, skip the interactive session. Claude Code has a print mode, claude -p "task", and Codex has codex exec "task". Each runs the task and exits, so you can start it under nohup or a job runner. You lose the chance to answer an approval prompt along the way, so set its permissions before you start.

What none of these survive

A multiplexer keeps processes alive while the machine runs. A reboot ends them, and on some Linux systems logging out does too. After a restart, start the agent again and pick up the conversation: claude --continue opens the most recent Claude Code conversation in that folder, and codex resume shows a list of past Codex sessions.

Sessions in Skiff

Skiff is a desktop app for Linux and macOS that runs coding agents side by side. A daemon, skiffd, owns every terminal, the way the tmux server does. Close the Skiff window and the agents keep working. Open it again and each terminal shows its current screen.

The mouse works for everything, and F1 lists every key. Sessions sit under the project and Git worktree they run in, and a bell or a flag shows which one needs you. From any terminal, skiff attach SESSION connects to a running session, and Ctrl+\ detaches again.

Skiff has the same limit as tmux. A reboot stops the processes. When the daemon starts again, Skiff restores the groups and layouts, and each session returns as a shell in its folder, ready for claude --continue or codex resume.