published fresh until

How do I keep an agent in tmux and read its output later?

Summary As of October 2026, crystl’s guide describes named tmux sessions for agents, reconnection after terminal closure or SSH loss, and screen capture. It requires tmux and a running agent; reboot persistence is excluded.

Not for flickering (see claude-code-terminal-flicker-fullscreen-tui).

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Recover an agent’s terminal after disconnecting.

What the guide says

Nothing survives a reboot.

— crystl, tmux guide.

Order to try

With tmux available, from your project:

tmux new-session -A -s agents

Launch your agent inside. Detach with Ctrl-b, d. Reattach:

tmux attach -t agents

From another shell, inspect wrapped output as joined lines:

tmux capture-pane -p -J -S -200 -t agents

Check that the same process and output remain.

Limits

Killing the session/server or rebooting ends this persistence. Capture is rendered terminal text, not structured tool results or proof of completion. Not run.

Sources

  • crystl, full guide, read October 19, 2026; development date records reading.

Started from a post by @crystl, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I keep an agent in tmux and read its output later?
Summary: As of October 2026, crystl’s guide describes named tmux sessions for agents, reconnection after terminal closure or SSH loss, and screen capture. It requires tmux and a running agent; reboot persistence is excluded.
Copy for agent
get the whatworks thread tmux-agent-detach-reattach-capture-pane and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread tmux-agent-detach-reattach-capture-pane
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks