Skip to content
NewA calmer, faster ZeroHour

Guide shows how to run Claude Code agents in tmux sessions

Original title: Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling

Hacker News · securityby ankitg12 ()12 min read1
AI summary · x-ai/grok-4.7Summaries by Vani AI

Recent Claude Code can create a worktree and session with two flags; classic tmux is required to script it.

A guide explains running Claude Code agents in named tmux sessions that survive a closed terminal or dropped SSH link. Recent Claude Code can create the worktree and session with claude --worktree --tmux, but that does not cover several agents, scripted send-keys, or a remote SSH setup. The page then shows per-repo sessions, window and pane layouts, and a short agent-oriented tmux config.

Key facts
  • The --tmux flag errors unless --worktree is also set.
  • On iTerm2, --tmux uses native panes unless --tmux=classic is passed.
  • Percentage main-pane-width values need tmux 3.2 or newer.
Explain this AI news with Vani AIWhat was announced, what is new and why it matters, in a new chat

From the original article

12 min read at crystl.dev

tmux runs your AI coding agents in named, detachable sessions that survive a closed terminal or a dropped SSH connection. You get one window holding many agents, send-keys to type into any of them from a script, and capture-pane to read one back. That combination is why people use it.

Hacker News · security

By ankitg12 · crystl.dev

Read the full article at Hacker News · security

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.