# Stop every Claude Code session overnight, resume tomorrow

End the day with several Claude Code sessions open without losing a conversation, then bring them all back tomorrow by hand or with hivemux's clock out and in.

Source: https://hivemux.dev/guides/stop-claude-code-overnight/

> Every Claude Code conversation is saved on disk, so stopping the process loses nothing but the knowledge of which conversation ran in which folder. By hand, `/exit` each session and run `claude --continue` per folder tomorrow. hivemux does it in one click: Clock out stops every Claude (busy ones once they finish) and keeps each pane's session ID; Clock in runs `claude --resume <id>` in every pane.

With five or ten Claude Code sessions open across projects, the end of the day has a small problem: if you quit everything, tomorrow you have to remember which conversation lived in which folder; if you leave everything running, the Mac stays busy all night and you still have to find your place in the morning. Here is how to do it cleanly, with and without hivemux.

## By hand: stop, then continue per folder

Claude Code keeps every conversation in `~/.claude/projects/<project>/`, so stopping a session never deletes it.

1. In each session, wait for the current task to finish (a session stopped mid-task loses that task), then type `/exit`.
2. Tomorrow, `cd` into each project folder and run `claude --continue` for the latest conversation there, or `claude --resume` to pick one.

```sh
cd ~/code/api && claude --continue
cd ~/code/web && claude --continue
```

It works, but it scales badly: you have to remember the folders, each session needs its own terminal window again, and a session you forget stays forgotten. If the sessions run in tmux, the windows survive as empty shells, which helps with the folders but still means typing `claude --continue` in each.

## With hivemux: clock out, clock in

hivemux is a tmux sidebar that shows every Claude Code session — running, waiting for you, or done — and lets you jump to the one that needs you. Because it records every session's ID on its tmux pane, it can also stop and restart all of them.

**Clock out.** Press 🌙 Clock out in the bee office, or right-click empty space in the sidebar → *Clock everyone out…*, or run `hivemux-shift off`. Then:

- A session that is idle or done is stopped right away.
- A session that is working or waiting for your answer stays on for overtime and is stopped as soon as it finishes, so nothing is cut mid-task.
- Each pane keeps its shell and its session ID; the sidebar shows the sessions as home.
- In the bee office the bees clap and go home to their flats in the Hive Residence.

**Clock in.** Press ☀️ Clock in, right-click → *Clock everyone in…*, or `hivemux-shift on`. Every pane that sits at a shell gets `claude --resume <id>`, and each conversation is back where it stopped. Sessions you ended with `/exit` are not brought back.

```sh
hivemux-shift off          # everyone goes home
hivemux-shift on           # everyone comes back
hivemux-shift status       # "on <since>" or "off <since>"
```

[Image: The bee office with its Clock out button: each bee is a Claude Code session]

### One Claude, or one project

You do not have to stop everything. Right-click a Claude's line → *Clock this Claude out…* stops that one session; right-click a project's name → *Clock this project out…* stops its sessions. Their lines stay in the sidebar with a lavender `home` on the right, and right-click → *Clock in* brings them back in the same conversation. Clocking everyone in brings them back too.

### While clocked out

A reboot while clocked out does not resume anything; the sessions wait for you to clock in. And clocking out is not quitting: you can still start a new Claude in any window, and it works as usual.

## Which to use

| | By hand | hivemux |
|---|---|---|
| Stop everything | `/exit` in each session | one click or `hivemux-shift off` |
| Busy sessions | you wait, or lose the task | finish first, then stop |
| Resume tomorrow | `claude --continue` per folder | one click, every pane |
| Forgotten session | stays forgotten | listed in the sidebar as home |
| Reboot overnight | nothing resumes | nothing resumes until you clock in |

```sh
curl -fsSL https://hivemux.dev/install.sh | bash
```

What a reboot restores without the clock-out is in [How to resume Claude Code sessions after a reboot](/guides/resume-claude-code-sessions/); the ID hivemux resumes with is explained in [How to find a Claude Code session ID](/guides/claude-code-session-id/).

## FAQ

### Do I lose anything by stopping Claude Code at the end of the day?

Not the conversation; it is on disk and `claude --resume` reopens it. You lose the terminal screen (scrollback) and any task that was still running, which is why hivemux lets a working session finish before it stops it.

### Why stop them at all, instead of leaving them running?

An idle Claude Code session costs nothing, but a dozen processes keep memory and may be what keeps the Mac from sleeping. Stopping also makes the morning explicit: everything comes back at once, in the same conversations.

### What happens if the Mac reboots while I am clocked out?

Nothing is resumed, by design. hivemux's restore skips the sessions while you are clocked out; clocking in brings them back. Without the clock-out, a reboot would resume every saved pane.

### Can I clock out one project and keep the others working?

Yes. Right-click a session's line in the sidebar → Clock this Claude out, or a project name → Clock this project out. The line stays in the sidebar with home on the right; right-click it → Clock in brings that Claude back in the same conversation.
