# Sleeping chats: less memory, same history

> Idle Shuriken chats sleep after 20 minutes: the agent process closes to free memory, and your next message wakes it. What 5.1 adds to sleep.

Source: https://shuriken.sh/blog/sleeping-chats

Idle Shuriken chats sleep after 20 minutes: the agent process closes to free memory, and your next message wakes it. What 5.1 adds to sleep.

[Update](https://shuriken.sh/blog) By Shuriken Updated 12 November 2026 4 min read

**Contents**

A chat in Shuriken that has sat idle for 20 minutes goes to sleep. Its agent process closes and gives its memory back. The chat stays where it was, with every message, and your next message wakes it on the same session. Chats that are running, waiting for you or holding a queue never sleep. Sleep has been in Shuriken since 29 September, the day of the first prereleases; 5.1 adds an on/off switch, reading without waking, and a cap on what sleeping chats keep in memory.

## The problem: forty chats, all of them awake #

Any chat can work on its own branch and worktree, and Shuriken puts no cap on how many you run. We took ourselves up on that first. A normal afternoon of building Shuriken turned into twenty or forty chats across a few projects, most of them finished an hour ago and still sitting there.

Every one of those chats had a live agent process behind it: a Claude Code, Codex or Gemini CLI waiting for its next prompt. One idle CLI doesn't weigh much. Forty of them do, and your laptop's fan is the first to tell you. "Why is this using so much memory when nothing is happening?" had one honest answer: because nothing was ever let go.

So sleep was one of the first things we built, back in September. In 5.1 we went back and finished the job.

## What sleeping does #

Once a minute, the background service looks for chats that may sleep. A chat goes to sleep when all of this is true:

- nothing has happened in it for 20 minutes (no messages, no output, not opened);
- it isn't running a turn;
- it isn't waiting for your approval or an answer;
- it has nothing in its [queue](https://shuriken.sh/features/queue);
- its subagents and background commands (a dev server it started, a test run) have finished;
- it isn't the chat on your screen;
- its agent can pick up a saved session later.

That last rule matters. A chat whose agent can't resume a session stays awake, because closing it would lose the thread. Sleep only happens when waking is safe.

When a chat sleeps, Shuriken closes its agent process. That's all. The chat's record, its history and the agent's saved session stay on your computer. The chat's tab and the sidebar say Sleeping, and hovering it tells you the rest: "wakes on your next message".

## Waking up #

Send a message and the chat wakes. The agent starts again on the same session it had, so it remembers the conversation, the files it read and the plan it was following. You'll notice a short pause while the agent starts. That's the whole price.

New in 5.1: reading doesn't count. You can open a sleeping chat, scroll its history and copy something out of it, and it stays asleep. Only a message wakes it. The exception is a chat whose history the service no longer holds in memory, after a restart or on a very busy day (more on that below): opening it wakes it to read the history back.

In Shuriken a chat can work on its own branch in its own worktree, and Finish merges it after your checks.

[Try Shuriken](https://shuriken.sh/)

## Change the time, or turn it off #

Sleep is on by default. In 5.1, Settings › Chat has it as a switch. Like the other settings there, it applies to all your computers and servers:

- Sleep idle chats: the switch. Off means no chat sleeps, ever.
- Sleep after: 10, 20, 30, 60 or 120 minutes. 20 is the default.

Turn it off and later back on, and Shuriken brings back the time you had before.

If you run a big server with memory to spare, a longer time is fine. On a 16 GB laptop with a browser, an editor and a dozen chats, 10 or 20 is kinder.

## How this relates to "Connection lost" #

In October, Shuriken 5.0 could stall chats on "Connection lost" while the app reloaded. We wrote up the cause in [Why chats said "Connection lost"](https://shuriken.sh/blog/why-chats-said-connection-lost): loading one very long chat's history could freeze the background service, and its restarts interrupted running agents.

Sleeping chats are a separate change, but they share the theme. The service keeps a sleeping chat's messages in memory so that opening it is instant and doesn't wake it. Before 5.1, nothing capped the total of what all sleeping chats kept. In 5.1 there is a total: past it, the chats that have slept longest let their copy go, and the next time you open one it wakes and reads its history back. Together with history that now loads in bounded memory, that's why the background service no longer runs out of memory on a big day.

So, two kinds of memory, two fixes:

| What held memory | What 5.1 does |
| --- | --- |
| An idle agent process per chat | Closes it after 20 idle minutes (you choose) |
| Messages kept for sleeping chats | Keeps them within one total; the longest asleep let go first |
| Loading a very long history | Reads it in bounded memory, with a guard that stops before the service runs out |

## Why not just close chats? #

We could have asked you to clean up. We don't think a tool should make you manage its memory. Finished chats are useful: you come back to them, fork them, ask a follow-up a day later. Sleeping keeps every chat one message away, without paying for forty idle processes in the meantime.

It also fits how Shuriken is built. Agents run on your own computers and servers, through the [background service](https://shuriken.sh/features/background-service), so memory on those machines is yours to spend. We'd rather it go to the chats that are working.

Sleeping chats work on Mac, Windows, Linux and servers, and the switch, reading without waking and the memory cap come with Shuriken 5.1. If you run a lot of chats at once, [running agents in parallel](https://shuriken.sh/guides/run-claude-code-agents-in-parallel) has more on keeping a big setup calm. New to Shuriken? [Try it here](https://shuriken.sh/).

Share

[X](https://x.com/intent/post?url=https%3A%2F%2Fshuriken.sh%2Fblog%2Fsleeping-chats&text=Sleeping%20chats%3A%20less%20memory%2C%20same%20history)[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fshuriken.sh%2Fblog%2Fsleeping-chats)[Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fshuriken.sh%2Fblog%2Fsleeping-chats&t=Sleeping%20chats%3A%20less%20memory%2C%20same%20history)[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fshuriken.sh%2Fblog%2Fsleeping-chats&title=Sleeping%20chats%3A%20less%20memory%2C%20same%20history)[E-mail](mailto:?subject=Sleeping%20chats%3A%20less%20memory%2C%20same%20history&body=https%3A%2F%2Fshuriken.sh%2Fblog%2Fsleeping-chats)

## Frequently asked questions

**Do I lose anything when a chat sleeps?**

No. Only the agent's process closes. The chat, its history and its saved session stay, and your next message picks the same session back up.

**Which chats never sleep?**

A chat that is running, waiting for your answer, has messages in its queue, has subagents or commands still going, or is open on your screen stays awake.

**Can I change when chats sleep, or turn it off?**

Yes. Settings › Chat has a Sleep idle chats switch and a Sleep after choice of 10, 20, 30, 60 or 120 minutes. The default is 20 minutes.

**Can I read a sleeping chat without waking it?**

Usually, yes. In 5.1, opening a sleeping chat shows its history and leaves it asleep. A chat that slept through a restart, or let its copy go on a busy day, wakes to read its history back.

Parallel agents

Agents side by side, each on its own branch if you want.

A new chat gets its own branch and worktree unless you pick the project folder, so agents don't step on each other. Finish runs your checks and merges each one back.

[Try Shuriken](https://shuriken.sh/)

[How it works](https://shuriken.sh/features/parallel-agents)

## Keep reading

- [What's new in Shuriken 5.1: Update 27 Oct 2026 16 min read Shuriken 5.1 adds sign-in with Google, Apple or an email code, Allow and Always allow at a MacBook's notch, and billing and fuel in Sources.](https://shuriken.sh/blog/shuriken-5-1)
- [Claude Code pull requests that merge themselves: Update 10 Nov 2026 3 min read Land a coding agent's branch as a GitHub pull request with auto-merge on, so it merges once your checks pass. When to use that and when Finish is enough.](https://shuriken.sh/blog/pull-requests-auto-merge)
- [Fork a chat from any reply, then merge it back: Update 27 Oct 2026 4 min read Try another approach without losing the first: fork a Shuriken chat from any reply, keep the fork under its parent, then merge its work back in.](https://shuriken.sh/blog/fork-and-merge-into)
- [Finish: checks, rebase and merge in one click: Update 27 Oct 2026 3 min read A Shuriken chat can work on its own branch. Finish commits what's left, rebases, runs your checks and squash-merges it, then cleans up.](https://shuriken.sh/blog/finish-one-click-merge)
- [Many dev servers, many worktrees, no port fights: Story 8 Nov 2026 5 min read Parallel Claude Code worktrees all want port 3000. How Shuriken finds dev servers, hands each worktree its own port, and tips that work without it.](https://shuriken.sh/blog/worktree-port-conflicts)
- [How Shuriken started: a tool we built for ourselves: Story 27 Oct 2026 4 min read We build software for clients and ourselves. No harness fit how heavily we use AI, so we built our own. Then a programmer asked: why don't we sell this?](https://shuriken.sh/blog/how-shuriken-started)
- [A git workflow for Claude Code that keeps main clean: Story 27 Oct 2026 4 min read The Claude Code git workflow we'd give anyone running several agents: a branch per task, small commits, read the diff, checks before merge, then squash.](https://shuriken.sh/blog/claude-code-git-workflow)
- [How to review AI-generated code without reading every line: Story 27 Oct 2026 5 min read We review agent diffs tests first: would each test fail without the change? Then deletions, the diff's edges, secrets, and a run. Our real misses.](https://shuriken.sh/blog/review-ai-generated-code)

## Free tools

- [Claude limit reset tracker](https://shuriken.sh/tools/limit-resets/claude)
- [Codex limit reset tracker](https://shuriken.sh/tools/limit-resets/codex)
