Workflow guide
Restart your Mac without losing your Claude Code and Codex sessions
Some developers go months without restarting because a reboot means reopening a dozen windows, finding every agent conversation and explaining again what each one was doing. This guide is for anyone running several Claude Code or Codex sessions. By the end, you can quit or restart whenever you need to, and your tasks come back under their projects with their conversations.
By Brian Kibet, founder of Hercus Reviewed
The short answer
A restart doesn't delete your conversations: Claude Code and Codex both save them on your Mac. The slow part is resuming each one. By hand, you open each repo and run claude --continue or codex resume --last, one session at a time. With Hercus, quit or restart whenever you like. When it opens again, the tasks you were working in resume their conversations on their own, the rest resume when you open them, and an agent that was cut off mid-step is told to continue.
Why restarting feels risky
With one agent, a restart costs a minute. With a dozen across several repos, it can cost a morning. The conversations survive on disk, but nothing remembers which window held which repo, which session belonged to which feature, or what each agent was halfway through.
So the restart gets put off, and updates wait with it. This is the work a restart by hand leaves you:
- Reopening every editor window and terminal in the right folder.
- Finding the right conversation for each repo and feature.
- Telling an agent that was cut off what it was doing.
- Starting the dev servers each project needs again.
Restart without the rebuild in Hercus
Hercus keeps your projects, workspaces and tasks, and remembers which Claude Code or Codex conversation belongs to each task. Set it up once, then quit or restart whenever you need to.
-
Keep each repo as a project and each feature in a workspace
Open every repository you work in as a project, and give each feature its own workspace. Each task you start there is saved with its agent and the conversation it belongs to.
You'll see: Your tasks listed under their workspace, each with its agent.
In the docs: Projects and workspaces
-
Leave Launch at Login on
Launch at Login is on by default. You'll find it in Settings, on the General tab, under Startup. With it on, Hercus is already running in the background when you sign in after a restart.
You'll see: Launch at Login switched on under Startup.
-
Quit or restart when you need to
Press ⌘Q, install an update or restart your Mac. Before Hercus closes, it stops each agent and saves which folder each terminal was in.
You'll see: "Preparing to quit" while Hercus saves your place.
-
Open Hercus and let your tasks resume
When Hercus opens, the tasks you were working in resume on their own: Hercus restarts each agent with its own resume command, so the conversation comes back. An agent that was cut off mid-step is sent "Continue from where you left off before the app was interrupted." If its next queued instruction is set to auto-send, Hercus sends that instead.
You'll see: Each task shows Resuming terminal, then its conversation.
In the docs: Task status
-
Open other tasks as you need them
Tasks in your other workspaces resume when you switch to that workspace, and any other task resumes when you open it. If a task can't resume, for example because its conversation was deleted, Hercus says why and offers Try again, Start task again or Discard task.
You'll see: The task's conversation back in its terminal.
What comes back, and what doesn't
Everything you set up comes back: projects, workspaces and their branches, tasks and their conversations, queued instructions, drafts, terminal groups in their folders, and browser tabs.
Anything that was running doesn't. Commands in a terminal stop when Hercus quits, and each terminal comes back as a fresh shell in the same folder with its earlier output. Dev servers start again only if you've turned on Auto-run for them. The step an agent was in the middle of starts over as a new turn, so check that step's work before you build on it.
In the docs: Start a dev server automatically
Resume sessions by hand
Without Hercus nothing is lost either, but you resume each session yourself, in the folder it started in.
-
Claude Code
Open a terminal in the repo and run claude --continue to pick up the most recent conversation there, or claude --resume to choose one from a list. Claude Code deletes conversations older than 30 days by default.
In the docs: Anthropic's guide to resuming conversations
-
Claude Code background agents
A restart stops the sessions you run in Claude Code's agent view. Run claude agents, then open or reply to each session to bring its conversation back.
In the docs: Anthropic's agent view guide
-
Codex
Open a terminal in the repo and run codex resume --last for the most recent session there, or codex resume to pick one. Add --all to see sessions from other folders.
In the docs: OpenAI's codex resume reference
-
Repeat for every repo
Do this for each repo and feature, then tell any agent that was cut off what it was doing. With a dozen sessions, this is the part that takes the morning.
See the details
Each part of this guide has its own page with more screenshots and specifics.
- Your workspace
Projects, workspaces and the tasks Hercus keeps for each.
- Task terminals
Task terminals, queued follow-ups and auto-send.
- Tasks in the docs
Task status, queued instructions and what to do when a task needs attention.
Frequently asked questions
Do I lose my Claude Code conversation when I restart my Mac?
No. Claude Code saves every conversation on your Mac. Run claude --continue in the same folder to pick up the latest one, or claude --resume to choose. By default it deletes conversations older than 30 days.
Sources: Anthropic's guide to resuming conversations, Claude Code settings reference
How do I resume a Codex session after a restart?
Run codex resume --last in the project folder for the most recent session, or codex resume to pick one. Add --all to include sessions from other folders.
Sources: OpenAI's codex resume reference
Do my agents keep running when I close the Hercus window?
Yes. Closing the window hides Hercus and your agents keep working; choose Show Hercus from the menu bar icon to bring it back. Quitting with ⌘Q stops them, and Hercus resumes your tasks when it opens again.
How much does Hercus cost?
Hercus is free for 7 days, with no credit card. After that it's $20 a month or $200 a year. Your Claude Code or Codex subscription is billed separately.
Related guides
Run multiple Claude Code agents at once without losing track
Starting another Claude Code session takes seconds. Keeping track of six of them across three repos is the hard part. This guide is for developers running Claude Code in more than one repo. By the end, every session sits under its repo and feature, you can see at a glance which ones need you, and each change is ready to review where it was made.
WorkflowRun multiple Codex agents at once without losing track
Starting another Codex session takes seconds. Running a dozen of them across terminal tabs, VS Code windows and repos is where it falls apart. This guide is for developers who run Codex on its own, in the CLI or the IDE extension, across several repos. By the end, every Codex task sits under its repo and feature, you can see which ones need you, and a Codex task can split its work into subtasks that report back.
WorkflowUse Claude Code and Codex together without running two setups
Plenty of developers use both agents: Claude Code for some tasks, Codex for others, and whichever still has plan left when the other runs low. Using both usually means two terminals or apps, two sets of skills and MCP servers, two usage limits to watch, and copying context across by hand every time you switch. This guide is for developers who use both, or want to. By the end, each task runs on the agent you choose, you can hand a task from one to the other, and both agents share one setup.
Restart without rebuilding your setup
Download Hercus for Mac, open the repos you already work in, and quit or restart whenever you need to. Free for 7 days, no credit card needed.
Choose your platform