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

Annotation-Driven UI: How to Design Templates in Figma and Let Claude Extract Coordinates
Skip building a custom layout engine: design flat PNGs in Figma, draw colored rectangles for slots, feed both to Claude, and get editable area definitions with tap targets. One afternoon instead of weeks.

Four local files to maintain Claude's context in long projects
A Reddit user recommends maintaining four Markdown files—claude.md, memory.md, restart.md, and backlog.md—as external memory for Claude to counteract context window compression in extended conversations.
A cron timeout does not prove your OpenClaw action failed
If a cron job times out after sending a message or publishing content, OpenClaw knows the run errored, but not whether the provider accepted the action. Treat ambiguous timeouts as unknown, not failed.

Practical Habits for Critical LLM Interaction
A Reddit post outlines specific techniques for avoiding confirmation bias when working with LLMs, including custom prompt modes like 'strawberry' for neutral explanation and 'socrates' for adversarial scrutiny, plus evaluating training data composition.