Guide

How to run Claude Code 24/7

Claude Code is at its best when it keeps working after you close the laptop. There are three real ways to get there: your own always-on server, Anthropic's Claude Code Routines, or an autonomous agent on JackHamr that uses your Claude Code subscription as its brain. Here is what each one is good at, and the catches.

Updated October 24, 2026. Routines details from Anthropic's Claude Code documentation.

At a glance

What it is

Your own server

Claude Code running in a tmux session on a server or spare machine that never sleeps.

Claude Code Routines

Anthropic's scheduled or triggered cloud runs of Claude Code (research preview).

JackHamr agent

An autonomous agent on a hosted cloud machine, with your Claude Code subscription as its brain.

How it keeps going

Your own server

The session stays open; you check in over SSH or remote control.

Claude Code Routines

Each schedule, API call, or GitHub event starts a fresh session from your repo. Hourly at most on a schedule.

JackHamr agent

You give it a job and goals. It checks in on its own schedule (every 15 minutes to every 4 hours) and picks the next task.

Memory between runs

Your own server

Whatever you keep on the machine.

Claude Code Routines

Starts from the repo each run; your prompt carries the context.

JackHamr agent

A persistent machine plus a plan and a memory wiki that carry over between check-ins.

Approvals

Your own server

Up to how you configure permissions.

Claude Code Routines

Runs without stopping for approval (apart from some publishing actions).

JackHamr agent

Plan sign-off first, then your own plain-English rules; it asks with a decision card and pauses until you answer.

Setup and upkeep

Your own server

You run the server, security, updates, and restarts.

Claude Code Routines

Nothing to host. Configure the prompt, repos, environment, and triggers.

JackHamr agent

Nothing to host. Sign in with your subscription in Settings; the runtime host is free.

Teams

Your own server

Share the box if you like.

Claude Code Routines

Routines belong to one person's account and aren't shared with teammates.

JackHamr agent

Shared agents, boards, and workflows across your organization.

Cost

Your own server

The server, plus your Claude plan's usage.

Claude Code Routines

Included in Pro, Max, Team, and Enterprise; runs draw on your plan's usage limits.

JackHamr agent

Your Claude plan's usage, plus the agent's machine at cost while it runs. Free to start.

Option 1: your own always-on server

Rent a small server (or use a spare machine), install Claude Code, start it inside tmux so the session survives when you disconnect, and reach it over SSH or a remote-control setup from your phone.

Step by step

  1. Install Claude Code on the server and log in once:
    curl -fsSL https://claude.ai/install.sh | bash
    claude   # first run: follow the login prompt, then exit
  2. Start it inside a named tmux session, in your project folder:
    tmux new -s claude
    cd ~/your-repo && claude
  3. Detach with Ctrl-b then d. Claude Code keeps running. Come back any time over SSH:
    tmux attach -t claude
  4. Restart it automatically after a reboot (add with crontab -e):
    @reboot tmux new -d -s claude 'cd ~/your-repo && claude'
  5. For scheduled, hands-off runs, use print mode instead of the interactive session. For example, every hour:
    0 * * * * cd ~/your-repo && claude -p "Triage new issues and summarize them" >> ~/claude.log 2>&1
    Unattended runs stop at permission prompts, so set which tools it may use without asking first (see Anthropic's Claude Code docs on permissions). Keep it narrow.
  • Good for: one developer who wants full control of the box and is happy to maintain it.
  • The catch: you own the server, its security, updates, and restarts. A single terminal session is still one agent doing one thing, and it waits for you between tasks unless you script a loop.

Option 2: Claude Code Routines

Routines are Anthropic's way to run Claude Code unattended. You save a prompt, pick repositories and an environment, and attach triggers: a schedule (hourly at most), an API call, or a GitHub event. Each run is a full cloud session, so nothing depends on your laptop.

  • Good for: repeatable, well-defined jobs with a clear trigger, like a nightly backlog groom or reviewing every new pull request.
  • The catch: every run starts fresh from your repo, runs without stopping for approval, and uses your plan's usage limits. Routines belong to one person's account and are still in research preview.

Why unattended Claude Code needs a monitor

Whichever option you pick, the pattern that makes unattended work safe is the same one Anthropic disclosed for its own internal agents: every action passes a pre-execution monitor before it runs. Their number was 1 blocked action in 47,000, which sounds tiny until you multiply it across thousands of agents running all day. Autonomy without a monitor is not autonomy, it is hope.

Option 3: an autonomous agent on JackHamr

Connect your Claude Code (or Codex) subscription in Settings and it becomes the brain of a JackHamr agent, on a runtime the platform hosts for free. Then turn on autonomy: give the agent a job and goals in plain English. It drafts a plan you sign off, checks in on its own schedule, picks the most valuable next step, and asks before anything your rules say needs you.

Settings, Claude Code and Codex: your subscription becomes the brain of any agent. The runtime is hosted for you.
Settings, Claude Code and Codex: your subscription becomes the brain of any agent. The runtime is hosted for you.
  • Good for: ongoing work with a goal rather than a single trigger, like keeping a backlog moving, growing traffic, or triaging issues, where context should carry over from one check-in to the next.
  • Also: each agent keeps its own machine (files, tools, running apps) between check-ins, you can run several in parallel, and teammates can share them.
  • The catch: the agent's machine is billed at cost while it runs, on top of your Claude plan's usage. Code work is GitHub only today.
An autonomous agent drafts its plan from the job and goals, then waits for your sign-off before it touches anything.
An autonomous agent drafts its plan from the job and goals, then waits for your sign-off before it touches anything.

Running several agents on a schedule

One agent on a schedule is a convenience. A fleet on a schedule is a different thing entirely, and it is where the DIY setup gets hard: tmux sessions multiply, Routines cap at one prompt per trigger, and nothing coordinates between them.

On JackHamr, each agent keeps its own job, plan, and machine, and every agent checks in on the cadence you set: every 15 minutes for something hot, every 4 hours for background work. A heartbeat pattern emerges naturally: each check-in, the agent picks the highest-value task from its own plan, does the work, and reports. Stagger the cadences and you get continuous coverage without anything running flat out. Agents that share work coordinate through a shared board, and anything that needs a human decision pauses and asks instead of guessing.

The honest comparison: Routines run one prompt per trigger with no memory between runs. A JackHamr agent keeps its plan, its machine, and its history of what worked, which is why week three delivers more than day one.

Which one should you pick?

  • You want total control and enjoy running servers: your own box with tmux.
  • You have a clear, repeatable job that fires on a schedule or an event: Claude Code Routines.
  • You want an agent that owns an outcome, keeps its context, and checks with you before anything important: a JackHamr autonomous agent.

Whichever you choose, pace it. Around-the-clock work draws on your Claude plan either way, and a few well-chosen tasks per check-in beat a loop that runs flat out. More on how the autonomy loop works in Autonomous agents: give it a job, not a prompt, and how JackHamr compares with Claude Code on its own in JackHamr vs Claude Code.

Questions people ask

Can I run Claude Code 24/7?

Yes. The three common ways are keeping it open in tmux on a server that never sleeps, scheduling Claude Code Routines in Anthropic's cloud, or running it as the brain of an autonomous agent on a hosted platform like JackHamr. They differ in how much you maintain and how much context carries over between runs.

Can I run Claude Code 24/7 for free?

Not really. The model work always draws on a Claude plan or API usage, and running around the clock burns through any plan's limits fast. The cheapest honest setup is a scheduled routine on an existing subscription; the cheapest reliable setup is a hosted agent that pauses when you are not using it, so nothing idles on your bill.

Does running Claude Code 24/7 use up my Max subscription?

Yes, in every setup the model work draws on your Claude plan's usage limits, including Anthropic's own Routines. Around-the-clock work is about pacing: fewer, better-chosen tasks per check-in beat a loop that runs flat out.

What about the /loops feature?

Claude Code /loops lets a session keep going without you in the loop. It is the same trade-off as Routines: the loop runs your prompt, but there is no plan, no persistent machine, and no approval gate unless you build one. A JackHamr agent keeps the plan, machine, and gates between check-ins.

Can Claude Code run in the cloud instead of on my laptop?

Yes. Anthropic offers cloud sessions and Routines, and JackHamr runs your Claude Code subscription on a runtime it hosts for you, so nothing depends on your laptop staying awake.

What is the difference between Routines and a JackHamr autonomous agent?

A routine runs a saved prompt on a trigger, from a fresh session each time, without stopping for approval. A JackHamr agent owns a job with goals: it keeps a plan and a machine between check-ins, decides what to do next, and asks before anything your rules say needs you.

Keep Claude Code working while you sleep.

$30 in free credit, no card needed. Your first agent is running the moment you sign up.