# Heroin mode comes to Windows and Linux

> Shuriken 5.1 keeps Windows and Linux computers awake for your coding agents, lid closed included where the machine allows it. Same name, same warnings.

Source: https://shuriken.sh/blog/heroin-mode-windows-linux

Shuriken 5.1 keeps Windows and Linux computers awake for your coding agents, lid closed included where the machine allows it. Same name, same warnings.

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

**Contents**

On Windows, a laptop goes to sleep when you close the lid because the power plan tells it to. You can change that by hand: Control Panel › Power Options › Choose what closing the lid does › Do nothing. Since Shuriken 5.1, Heroin mode does it for you while it's on, keeps the computer from sleeping, and puts your old setting back when you turn it off. The same goes for Linux, and the Mac already had it.

Yes, it's still called Heroin mode.

## Why this took a while #

The Mac version has been there since our first prerelease on 29 September. Close the MacBook, the agents keep working.

The question we kept hearing after that was whether it works on Windows or Linux. It didn't. Windows and Linux users had to dig through power settings, install a keep-awake utility, or leave the lid open with the screen dimmed and hope. So we built it.

## Pick which computers stay awake #

Click the syringe button in the top bar. (We did say we were keeping the name.) You get a list of your devices, this one and the others you've linked, with a switch for each. Turn one on and it stays awake until you turn it off. A pill in the sidebar reminds you it's on.

You can turn it on for a computer that isn't in front of you. Left the office laptop running a long task? Switch it on from home.

## What the picker tells you #

Next to each device the picker shows one of five lines, read from the machine itself.

- "Keeps running with the lid closed." Close it; the agents keep going.
- "Stays awake with the lid open. With the lid closed, it needs a one-time permission." This is the Mac until you press Allow: macOS asks for an administrator password once. You can take the permission back later.
- "Stays awake. No lid setting found on this computer." The computer won't sleep, but we found no lid setting to change, so don't count on it with the lid shut.
- "No lid: stays awake." A desktop, with nothing to close.
- "Can't stay awake: this system has no systemd-logind." Some Linux setups, covered under Linux below.

## How it works on each system #

### Mac #

Shuriken keeps the Mac from sleeping while it runs. For the lid, macOS needs one setting that only an administrator can change, which is why there is a one-time permission. It goes back to normal when Heroin mode goes off.

### Windows #

Shuriken tells Windows not to sleep while Heroin mode is on, and sets your power plan's lid action to Do nothing. Before it changes anything, it writes down what the setting was. When you turn Heroin mode off, the old values go back. If Shuriken stops unexpectedly, a small guard process puts them back anyway.

### Linux #

Shuriken asks systemd-logind to hold off sleep, idle and the lid switch for as long as it is running. Nothing permanent changes on your system: when Shuriken stops, the hold goes with it. Most desktop distributions use systemd-logind. If yours doesn't, the picker says so instead of pretending.

Three systems, three ways to stay awake, and each one undoes itself when Heroin mode goes off.

Shuriken's Heroin mode keeps the computers you pick awake while your agents run.

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

## No promise for every laptop #

Laptops have opinions. Firmware, docks and company-managed power policies can all override what an app asks for. When the picker says "Keeps running with the lid closed", that's what it read from your machine, but try it once with a short task before you trust it with a whole night.

## The honest warnings #

The fun name comes with grown-up advice:

- Heat. A closed laptop has less room to breathe. Put it on a hard, open surface, not a duvet.
- Bags. A laptop working hard inside a backpack has nowhere to lose heat. Don't.
- Battery. Agents running all night use power like any heavy work. Plug it in for long runs.

Two things make it easier to be sensible. If you don't need the lid closed, each device's page has a plain Keep awake setting. A computer signed in to Shuriken starts on Always, so it stays reachable; switch it to While working and it holds the computer awake only while an agent, the queue or a workflow runs. And whenever Shuriken isn't running, your computer sleeps as usual. For a machine that should never sleep, a [server](https://shuriken.sh/server) is the calmer option.

The plain Keep awake setting on a device's page, with While working and Always.

## Yes, it's called Heroin mode #

Yes, that's its name. Your laptop looks out cold with the lid shut and keeps working anyway, it's a little bit irresponsible, and you won't forget what it does. The longer answer is in [Yes, it's called Heroin mode](https://shuriken.sh/blog/heroin-mode-yes-really).

Heroin mode is on every plan, Free included. The details live on the [Heroin mode page](https://shuriken.sh/features/heroin-mode), the Mac walk-through is in [keep Claude Code running with the lid closed](https://shuriken.sh/guides/keep-claude-code-running-lid-closed), and the Windows and Linux apps are on [/windows](https://shuriken.sh/windows) and [/linux](https://shuriken.sh/linux). Or just [try Shuriken](https://shuriken.sh/) and close the lid.

Share

[X](https://x.com/intent/post?url=https%3A%2F%2Fshuriken.sh%2Fblog%2Fheroin-mode-windows-linux&text=Heroin%20mode%20comes%20to%20Windows%20and%20Linux)[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fshuriken.sh%2Fblog%2Fheroin-mode-windows-linux)[Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fshuriken.sh%2Fblog%2Fheroin-mode-windows-linux&t=Heroin%20mode%20comes%20to%20Windows%20and%20Linux)[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fshuriken.sh%2Fblog%2Fheroin-mode-windows-linux&title=Heroin%20mode%20comes%20to%20Windows%20and%20Linux)[E-mail](mailto:?subject=Heroin%20mode%20comes%20to%20Windows%20and%20Linux&body=https%3A%2F%2Fshuriken.sh%2Fblog%2Fheroin-mode-windows-linux)

## Frequently asked questions

**How do I keep a Windows laptop awake with the lid closed?**

By hand: Control Panel, Power Options, Choose what closing the lid does, and set it to Do nothing. With Shuriken, turn on Heroin mode for that computer and it sets this for you while it is on.

**Does Shuriken change my Windows power settings for good?**

No. It notes your lid settings before changing them and puts them back when Heroin mode goes off, and a guard puts them back if Shuriken stops unexpectedly.

**Does it work on every Linux distribution?**

It needs systemd-logind, which most desktop distributions use. Without it, the picker says the computer can't stay awake.

**Can I carry my laptop in a bag while agents run?**

We advise against it. A laptop working hard in a closed bag has nowhere to lose heat. Leave it on a desk or a shelf, ideally plugged in.

**Is Heroin mode free?**

Yes. It is part of every Shuriken plan, Free included.

Heroin mode

Close the lid. Your agents keep working.

Pick which of your computers stay awake while agents work. On a Mac that holds with the lid closed, and on Windows and Linux where the laptop allows it.

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

[How it works](https://shuriken.sh/features/heroin-mode)

## Keep reading

- [Shuriken on Linux: AppImage, .deb, x64 and Arm: Update 29 Oct 2026 3 min read A desktop app for Claude Code, Codex and 65 more agents on Linux: AppImage or .deb, x64 or Arm, ChromeOS too, plus a headless server mode.](https://shuriken.sh/blog/shuriken-on-linux)
- [Keep awake only while agents work: Update 27 Oct 2026 3 min read Keep your computer awake while an agent, the queue or a workflow runs, then let it sleep. Shuriken's two settings: While working and Always.](https://shuriken.sh/blog/keep-awake-while-working)
- [Shuriken on Windows 10 and 11: Update 27 Oct 2026 3 min read Run Claude Code, Codex and 65 more coding agents in parallel on Windows 10 and 11. Installer or .zip, x64, with signed updates.](https://shuriken.sh/blog/shuriken-on-windows)
- [Claude Code denyInsteadOfPrompting: runs that don't stall: Story 7 Nov 2026 2 min read Claude Code 2.1.319 adds permissions.denyInsteadOfPrompting: a tool call that would wait on a permission prompt is denied and the turn carries on.](https://shuriken.sh/blog/claude-code-deny-instead-of-prompting)
- [Keep-awake apps for coding agents compared: Comparison 27 Oct 2026 7 min read Keep-awake apps for coding agents: caffeinate and KeepingYouAwake hold an open MacBook; pmset, Amphetamine and Heroin mode also hold a closed lid.](https://shuriken.sh/compare/amphetamine-alternatives-for-coding-agents)
- [How to run Claude Code overnight: Guide 27 Oct 2026 5 min read Run Claude Code overnight: keep the computer awake, keep the session alive when the terminal closes, and plan for limits and permission prompts.](https://shuriken.sh/guides/run-claude-code-overnight)
- [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 break reminders: take the break, keep the agents: Story 6 Nov 2026 3 min read Claude's break reminders sit in Settings › Wellbeing and nudge you after a daily amount of time. Take the break; your coding agents can keep working.](https://shuriken.sh/blog/claude-break-reminders)

## Free tools

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