Automating Claude Session Restarts with tmux and at

✍️ OpenClawRadar📅 Published: May 12, 2026🔗 Source
Automating Claude Session Restarts with tmux and at
Ad

Running out of Claude usage at inconvenient times, like 1am, wastes hours of potential work. One user on r/ClaudeAI shared a practical solution using tmux and at to automatically restart the session at a specific time.

Basic Setup

Install both tools if you haven't already:

# macOS
brew install at

# Debian/Ubuntu
sudo apt install at

Key Commands

The approach uses at to schedule a command that sends Ctrl+C to stop the current Claude process, then a continue (or claude) command to restart it.

Simple one-session version (no named tmux session):

echo "tmux send-keys C-c; tmux send-keys continue ENTER" | at now + 290 minutes

Named session version (session named 'claude'):

echo "tmux send-keys -t claude C-c; tmux send-keys -t claude 'claude' Enter" | at 23:30
echo "tmux send-keys -t claude C-c; tmux send-keys -t claude 'claude' Enter" | at now+239 minutes
Ad

Notes

  • Adjust the time offset to match when your usage resets.
  • If you only have one tmux session, you can omit -t claude.
  • The commands assume your tmux session is named claude.

This technique eliminates the need to manually restart at odd hours, giving you a full night of productive Claude time.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also