Close your laptop mid-conversation with Claude and you’ll get very different outcomes depending on what, exactly, you were running. A simple chat reply behaves nothing like a multi-hour Claude Code refactor, and neither behaves like a scheduled task set to fire every Monday morning. The confusion here is understandable — Anthropic has spread Claude across a browser tab, a terminal app, a mobile app, and a full agentic SDK, and each one has its own relationship to your physical hardware.
How Claude Actually Runs Under the Hood
It helps to separate two things that get conflated constantly: the model and the client. The model — Claude Opus 4.5, Sonnet 4.5, or Haiku, depending on what you’ve selected — is a massive neural network that only exists on Anthropic’s data center infrastructure (or, for enterprise customers, on Amazon Bedrock or Google Cloud Vertex AI). Nobody is running a full Claude model on a personal laptop; the compute requirements are far beyond consumer hardware.
The client, on the other hand, is whatever piece of software is sending your prompts to that model and receiving the output. That could be:
- The claude.ai website running in your browser
- The Claude mobile app on iOS or Android
- The Claude Code command-line tool installed on your machine
- A custom script hitting the Claude API directly
- An agent built with the Claude Agent SDK, deployed to a server somewhere
The model never stops existing when you close your laptop — Anthropic’s servers keep humming regardless. What stops is the connection between your device and that server, and that’s what determines whether your task survives.
This distinction matters because people often assume “Claude” is one monolithic thing that either persists or doesn’t. In reality, persistence is a property of the client architecture, not of the model itself.
Claude.ai Web Chat and the Mobile App
For the vast majority of users — people just chatting in the browser or the app — closing the computer during an active response is the riskiest moment. Claude streams tokens back to your browser in real time, and that connection depends on an open, active session.
Here’s what typically happens in practice:
- If you close the tab or put your laptop to sleep while Claude is mid-response, the stream usually gets cut off, and you’ll often see a partial or truncated answer when you reopen the conversation.
- If the response had already finished generating before you closed anything, it’s saved to your conversation history in Anthropic’s cloud, and you’ll see the complete answer next time you log in from any device.
- Projects and long conversation threads are stored server-side, so the content itself isn’t lost — but an in-flight generation is a different story than saved history.
This is also where people run into trouble with Projects, Claude’s persistent workspace feature for organizing files, custom instructions, and long-running conversation threads. If a project gets accidentally deleted or a thread disappears after a connection hiccup, recovery isn’t always straightforward, and it’s worth understanding your options — this guide on whether you can recover deleted projects on Claude AI walks through what’s actually salvageable versus permanently gone.
The mobile app behaves similarly but adds one nice wrinkle: because it’s built for a phone that people lock and unlock constantly, Anthropic has made basic chat responses more resilient to brief interruptions than the desktop browser experience. Still, a fully offline phone (airplane mode, dead battery) will interrupt an in-progress generation exactly the same way a closed laptop lid does.
Claude Code and the Local Terminal Problem
This is where “can Claude keep running when I close my computer” becomes a genuinely important operational question rather than a curiosity. Claude Code, Anthropic’s agentic command-line coding tool, runs as a process on your machine by default. It reads your files, executes shell commands, and calls out to the cloud model for reasoning — but the orchestration loop itself lives in your terminal.
That means if you close your laptop, put it to sleep, or lose your SSH connection while Claude Code is mid-task, the process dies. There’s no magic cloud continuation happening unless you’ve specifically set one up. This trips up developers who kick off a long agentic coding session — say, a multi-file refactor or a test-writing sprint — expecting it to keep chugging away like a cloud-based CI job.
Ways developers actually solve this
- tmux or screen: Start Claude Code inside a terminal multiplexer session on a remote server (a cloud VM, a Raspberry Pi, whatever), then detach. The session keeps running on that remote machine even after you close your local laptop entirely.
- nohup + disown: A lighter-weight Unix trick that lets a background process survive terminal disconnection, though it’s less robust for long, interactive agent loops than tmux.
- Remote development boxes: Running Claude Code on a persistent cloud instance (AWS EC2, a Hetzner box, GitHub Codespaces) rather than your personal laptop sidesteps the whole problem, since the “computer” that matters is never the one you close.
- Anthropic’s hosted sandboxes: For teams using Claude Code in CI/CD pipelines or cloud-based coding environments, tasks execute entirely on managed infrastructure, decoupled from any individual’s device.
If you’re weighing Claude Code against alternatives for this exact reason — persistence, session handling, how each tool manages long agentic runs — it’s worth comparing head-to-head against Microsoft’s offering in this breakdown of Claude Code vs GitHub Copilot, since Copilot’s newer agentic modes handle background execution somewhat differently.
It’s also worth keeping Claude Code itself current, since Anthropic has shipped meaningful changes to how sessions, checkpoints, and background execution behave across recent releases — check this walkthrough on how to update Claude Code if you haven’t touched your install in a while.
Scheduled Tasks and True Background Agents
The genuinely good news: Anthropic does offer ways to make Claude run independently of your device, and by 2026 these have matured well beyond novelty status.
Tasks (available to Claude Pro, Max, and Team subscribers) let you schedule a prompt to run automatically at a future time or on a recurring basis — daily news summaries, weekly report drafts, recurring research digests. Because these execute on Anthropic’s servers on a schedule, your laptop being open or closed is completely irrelevant. You could be asleep, offline, or on a plane, and the task fires anyway, waiting in your account for when you next check in.
| Setup | Where it actually runs | Survives closing your laptop? |
|---|---|---|
| claude.ai chat (active response) | Browser session ↔ Anthropic server | No |
| Claude Code (default, local) | Your local machine | No |
| Claude Code on a remote VM (tmux/SSH) | Cloud server you control | Yes |
| Scheduled Tasks (Pro/Max/Team) | Anthropic’s infrastructure, cron-style | Yes |
| Custom API agent on your own server | Wherever you deployed it | Yes, if server ≠ your laptop |
For anything more custom than the built-in Tasks feature, developers reach for the Claude Agent SDK, which lets you build autonomous, multi-step agents that call the API and run wherever you deploy the code — a Lambda function, a Docker container on a VPS, a Kubernetes job. None of that cares whether your personal laptop is open. The model selection matters here too, since Opus, Sonnet, and Haiku trade off cost and reasoning depth differently for long unattended runs; if you’re tuning which model handles a background job, this guide on how to change the model in Claude Code covers the practical tradeoffs worth knowing before you let something run unattended for hours.
There’s also Claude for Chrome, Anthropic’s browser-based computer-use agent, which can navigate websites and complete multi-step tasks on your behalf — but it still needs the browser process alive to act, so it falls into the “not truly detached” category unless it’s running inside a cloud browser instance rather than your local Chrome.
Practical Setups to Keep Claude Working After You Log Off
If your real goal is “I want to start something with Claude and walk away for hours,” here’s the honest hierarchy of reliability, from flimsiest to most robust.
- Don’t rely on an open browser tab. This is the least reliable option for anything longer than a single response — sleep mode, network drops, and browser tab suspension will all interrupt it.
- Use built-in Tasks for recurring, simple prompts. Perfect for daily briefings, content drafts, or monitoring-style prompts that don’t need deep multi-step reasoning chains.
- Move Claude Code to a remote box for anything long-running. A $5-a-month cloud VM with tmux solves 90% of “I need this to survive overnight” problems for developers.
- Build a proper API-based agent for production workflows. If you’re running something business-critical — say, an automated content pipeline — deploy it on real infrastructure rather than hoping your laptop stays awake.
- Consider your output destination, not just the compute. A lot of “background Claude” use cases are really about publishing pipelines — for instance, people running Claude alongside Beehiiv to automate newsletter production need the generation step and the publishing step both decoupled from any single device, since a newsletter that half-publishes because a laptop went to sleep is worse than one that’s simply late.
One underrated factor here: cost. Leaving a cloud VM running 24/7 for occasional Claude Code sessions costs real money even when idle, so many developers script auto-shutdown after a task completes, or use serverless compute that only bills for active runtime.
Conclusion
The question “can Claude run when I close my computer” doesn’t have one universal answer because Claude isn’t one product — it’s a model accessible through several very differently architected clients. The model itself is always alive on Anthropic’s servers, waiting for requests, but your specific session’s survival depends on whether the thing talking to that model lives on your laptop or somewhere else entirely.
The practical takeaway: if persistence matters for what you’re building — a long coding session, a recurring content pipeline, an unattended research agent — stop treating your personal computer as the execution environment. Use Tasks for scheduled simplicity, a remote server with tmux for Claude Code sessions, or a proper API deployment for anything resembling a production workflow. Anything less, and closing the lid will cost you exactly the work you were hoping would finish on its own.
FAQ
Usually not for long — sleep mode suspends network activity and often the terminal process itself, which breaks the connection Claude Code needs to keep executing commands and calling the API. Short naps of a few seconds sometimes survive, but you shouldn’t count on sleep mode for anything more than a brief pause.
Your prior conversation history is safe since it’s stored on Anthropic’s servers, but the specific response being generated when the connection drops is often truncated or lost, and you may need to regenerate it. Anything that had already fully streamed and saved before the disconnect will still be there when you reconnect.
Yes — the built-in Tasks feature on Claude Pro, Max, and Team plans is designed exactly for this, letting you schedule one-time or recurring prompts that execute on Anthropic’s own infrastructure with zero dependency on your device. It’s more limited than a custom API agent in terms of complex multi-step logic, but for recurring simple prompts it’s the lowest-effort way to get genuine independence from your laptop.
