qvib.pro
RU

Old MacBook as a 24/7 AI agent

Turn an old MacBook into a 24/7 autonomous agent on Claude Code: headless claude -p runs on cron, hands via MCP. A paid Claude plan is required.

платно MCP профи

Официально: Claude Code запускается неинтерактивно (headless) командой `claude -p` на движке Agent SDK — с --allowedTools, --permission-mode и --output-format json, что позволяет гонять агента по cron и скриптам без человека в цикле. Системные требования (офиц. setup): macOS 13.0+ или Ubuntu 20.04+/Debian 10+, 4 ГБ+ RAM — старый ноут подходит. Нужен платный план (Pro/Max/Team/Enterprise/Console); free-план Claude.ai доступа не даёт. Безопасная автономия — через auto mode (AI-классификаторы), а не через --dangerously-skip-permissions. checked 2026-07-14

Updated: 14.07.2026

$ curl -fsSL https://claude.ai/install.sh | bash

Open source ↗

Old MacBook as a 24/7 AI agent

Got an old MacBook Pro gathering dust in a drawer? It can become an AI worker that grinds away while you sleep 🌙

What it is and who it's for

The Claude model runs in Anthropic's cloud — which means the hardware barely matters: an old laptop handles exactly the same work as a new one. Its role is to be a "terminal" that never gets switched off: a round-the-clock host where Claude Code reads tasks on its own, digs into files and the repository, runs commands and reports back. The point isn't the MacBook's power, it's that this is a cheap always-on computer you can hand your routine work to.

Who it's for: vibe coders and enthusiasts with an idle Mac and a paid Claude plan who want an autonomous agent without renting a server. One important note: "fully autonomous" is a spectrum with guardrails, not a switch (a competitor post's "in 30 days" hook is a video's promise, not a guarantee).

Key capabilities

  • Headless mode, claude -p — running without interaction: you give it a prompt, the agent does the work and exits. It's powered by the same Agent SDK as regular Claude Code. Perfect for cron and scripts.
  • Hands via MCP — files, GitHub, the browser (Playwright), databases: the agent actually acts instead of advising. The connection format is covered in the "Connect MCP" card.
  • Schedulingcron/launchd (macOS) or cron (Linux) run the task on a timer: overnight runs, monitoring, automatic reports.
  • Structured output--output-format json (+ --json-schema) returns a result your script can parse and slot into a pipeline.
  • Safe autonomy — auto mode: AI classifiers approve the safe things themselves and block the dangerous ones. A middle ground between confirming every single step by hand and "skip all the checks".
  • Hardware is almost irrelevant — the official minimum is just 4 GB of RAM; the heavy reasoning goes to the cloud.

How to get started in 5 minutes

  1. Install Claude Code natively: curl -fsSL https://claude.ai/install.sh | bash, then run claude and log in. You need a paid plan (Pro or above) — the free Claude.ai plan doesn't give access.
  2. If the Mac is too old for macOS 13 — put Ubuntu 20.04+/Debian 10+ on that same laptop; the installer is the same.
  3. Give the agent hands: claude mcp add ... — connect the MCP servers you need (at minimum filesystem plus whatever you actually control).
  4. Test headless: claude -p 'what is in this project?' --output-format json.
  5. Put it on a schedule: a cron/launchd job with claude -p '<TASK>' --allowedTools '...'. To keep the laptop from sleeping, keep caffeinate handy (built into macOS).

When to take it and when not to

✅ Take it if you have an idle Mac and a Claude plan and want a cheap always-on agent for routine work (overnight runs, monitoring, automated tasks). ✅ Take it if you want your own "box in a drawer" under your control rather than someone else's cloud runner. ❌ Don't take it → local models ("Ollama") are better if your task is running an LLM on the device itself offline: an old Mac won't handle heavy inference, and Claude Code goes to the cloud anyway. ❌ Don't take it → a VPS/server ("A server from scratch") or GitHub Actions is better if you don't want to babysit physical hardware: a rented server has steadier uptime and networking than a laptop on Wi-Fi. ❌ Don't take it if you're willing to let the agent perform irreversible actions blind — without guardrails that's dangerous (see the gotchas).

Honest pricing

Claude Code itself as a CLI is free, but the models are paid. Officially you need a Claude plan (Pro or above, roughly $20/month) or a Console account billed by tokens (API rates); the free Claude.ai plan does NOT give access to Claude Code. For a round-the-clock agent the main cost is tokens and your plan's limits: on Pro, heavy autonomy will hit the ceiling, and for serious runs Max or API billing is more realistic. The electricity for an old laptop is pennies. Prices and limits change — check the current ones in your account. Tag: paid / mcp.

Gotchas

  • "Fully autonomous" ≠ safe. The --dangerously-skip-permissions flag is officially unsafe: the agent can do something irreversible. Use auto mode (AI classifiers) or isolation — a separate user/directory, a container, a sandbox.
  • OS requirements. The native installer wants macOS 13.0+ (or Ubuntu 20.04+/Debian 10+) and 4 GB of RAM. A truly ancient Mac stuck on an old macOS should go the Linux route.
  • The laptop must not sleep or lose the network. caffeinate keeps it awake; running with the lid closed usually needs power and/or an external display. If the laptop sleeps or the Wi-Fi drops, the agent goes silent.
  • Everything goes to the cloud. The model runs at Anthropic → you need internet, and private data leaves the machine. Don't feed it secrets blind.
  • Prompt injection through MCP. A server that pulls external content (web, email, tickets) can bring in a hidden instruction. Don't allow dangerous actions without confirmation.
  • Tokens run out. Hit your plan's limit and the autonomous agent stops until the reset.

🤖 Accelerator prompt

"You're Claude Code on an old MacBook that has to work autonomously. Help me set up a round-the-clock agent step by step and give me the exact commands for my OS (<macOS version / Linux>):

  1. installation: natively with curl -fsSL https://claude.ai/install.sh | bash, or the Linux route if macOS < 13;
  2. connect the MCP servers: <filesystem, github, playwright, …>;
  3. build a cron/launchd job that every runs claude -p '<TASK>' --allowedTools '...' --output-format json;
  4. security: auto mode instead of --dangerously-skip-permissions, a separate user/directory, caffeinate so the laptop doesn't sleep. Warn me about irreversible actions and explain how to verify each step worked."

Читать по-русски →