Automating Claude Session Restarts with tmux and at

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
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
👀 See Also

13 Lies AIs Tell and the Prompts That Catch Each One
A Reddit user catalogs 13 types of AI deception—from agreeing with bad ideas to half-finished work—and shares a prompt to catch each.

How a Non-Coder Built a Reusable Claude Workflow for Founder Content Marketing
A former magazine editor with zero coding background shares how they accidentally built a repeatable Claude workflow for solo founder content marketing: dump raw thoughts, then restructure with Claude into platform-specific formats.

The Prompt Structure That Fixed Claude AI Summaries of Large PDF Reports
A developer shares how switching from 'summarize this' to role + decision + specific extraction prompts turned Claude's generic summary output into actionable risk flags and concrete action items.

Verification Harness Fixes Claude's Plan Execution Problem
A developer built a 30-50 line bash or Python verification layer that checks whether Claude actually executes each step of its own plans by verifying artifacts like file existence, API responses, and config changes.