Run Claude Code and Codex on a cloud Mac
To run Claude Code on a cloud Mac, connect a Claude Team or Enterprise self-hosted environment to Macswarm. Pro and Max users can instead sign in inside a Pod. Codex connects through an Agents API webhook. Pods provide the Latest Xcode and pre-booted iOS Simulators.
How do I run Claude Code on a cloud Mac?
To run Claude Code on a cloud Mac, give it a Macswarm Pod: a hosted Mac with the Latest Xcode, current and previous iOS runtimes and pre-booted Simulators. A Claude Team or Enterprise organization connects through Anthropic’s self-hosted environments, in public beta: an Owner creates an environment, you paste its key into Macswarm, and sessions started from claude.ai, Claude Desktop or Slack pick that environment. Claude Pro and Max accounts cannot create one; they can start a Pod on Macswarm Free or Pro and sign in to Claude Code inside it. Codex reaches a Pod through an OpenAI Agents API webhook registered as its sandbox webhook. One Pod belongs to one developer, and that developer’s sessions share its two build slots and its Simulator pool; two to three active agents per Pod are guaranteed. Free includes 3 Pod-hours once, with no card. Billing runs per second until ten minutes after the last session ends; those ten minutes count.
Which Mac setup should I choose?
Compare four ways to give an agent Mac access, plus Xcode Cloud for CI-only work. Vendor prices come from the page linked in each row.
| Option | What you get | Price | Where it is the better choice |
|---|---|---|---|
| Your own Mac | Claude Code Desktop’s Simulator pane or the Codex app on hardware you own | No hosting charge beyond the Mac; model usage is billed by Anthropic or OpenAI | One developer, one or two agents, a Mac already on the desk |
| Rented dedicated Mac mini | A whole machine with root access; state stays between sessions; you operate it | MacRun $139 a month as a CI runner, $169 as an “Agent Mac” with “Claude Code and Codex installed” (checked 25 Oct 2026); MacRent $159 a month or $15 a day, excluding VAT (checked 25 Oct 2026); My Remote Mac $85 a month or $14 a day (checked 25 Oct 2026) | An agent that works around the clock, or you want to log in and install anything. See Macswarm vs MacRun |
| Per-minute Mac | A disposable Mac on Apple silicon with Xcode and root access that agents reach “over MCP, the CLI, the API or SSH” | NoMac $0.80 an hour, “billed by the minute”, prepaid credit from $10, a $5 cap per session by default (checked 25 Oct 2026) | Mac time in short bursts, no subscription. See Macswarm vs NoMac |
| Xcode Cloud | Apple’s CI: builds, tests and TestFlight uploads from a workflow. Not an agent host | Xcode Cloud includes 25 compute hours a month with Apple Developer Program membership; 100 hours cost $49.99 a month (checked 25 Oct 2026) | Scheduled builds and distribution with no agent in the loop. See Macswarm vs Xcode Cloud |
| Macswarm Pod | A hosted Mac per developer, shared by that developer’s sessions, with the Latest Xcode, pre-booted Simulators and XcodeBuildMCP; two to three active agents guaranteed; destroyed ten minutes after the last session | Selected metered plans: Free 3 Pod-hours once; Pro $99 a month for 300 Pod-hours, then $0.40 an hour; Team $399 for 1,500, then $0.30. Enterprise starts at $3,000 a month for reserved Macs. All four plans are on the pricing page | Several agents in parallel for one developer, an EU or US region, and Macswarm operating the Pod image, build queue and Simulator pool |
MacRun, NoMac and My Remote Mac name no region; MacRent names US West and EU (France, Netherlands). Inside a Pod lists what every Pod ships with.
How do I connect Claude Code or Codex to Macswarm?
Macswarm is in early access. Steps that mention the dashboard describe the current build; exact labels may change before general availability. If a control does not match what you see, write to info@macswarm.com.
How do I connect a Claude Team or Enterprise organization?
Anthropic’s self-hosted environment “executes Claude Code cloud sessions on infrastructure your organization operates” and is in public beta for Team and Enterprise organizations. With Macswarm, that infrastructure is a Pod.
- An Owner turns on Allow self-hosted environments in your claude.ai admin settings, creates an environment and copies its key.
- Sign up for Macswarm. Free gives you 3 Pod-hours once, with no card.
- Open Environments, choose Connect Claude, paste the key and pick EU or US. The status turns to Connected when the first Pod is ready.
- Add a deploy key or GitHub App for private repositories, and the secrets your builds need.
- Start a Claude Code session from claude.ai, Claude Desktop or Slack and pick the Macswarm environment. A Pod boots from the warm pool with your repository cloned and the Latest Xcode, iOS runtimes and Simulators ready.
The Claude Code quickstart has the details and troubleshooting; Claude Code self-hosted environments on macOS explains the architecture and what leaves the Pod. Anthropic bills the model usage to your organization; Macswarm bills the Pod-hours.
How do I use a Claude Pro or Max account?
Pro and Max accounts cannot create a self-hosted environment. What they can do today, as the FAQ states, is start a Pod on Macswarm Free or Pro and sign in to Claude Code inside it with their own account. Anthropic bills the model usage to that account; Macswarm bills the Pod-hours. The start and sign-in controls belong to the early-access dashboard and are not documented step by step here yet; write to info@macswarm.com and we will walk you through the current build. There is no SSH or screen sharing: you follow the agent through the logs and screenshots in the dashboard.
How do I connect Codex?
Codex gets a Mac through the OpenAI Agents API, whose self-hosted sandboxes let a webhook you register provide the environment (Self-hosted sandboxes). You need an OpenAI account with API access; no Claude plan is involved.
- Sign up or sign in. Open Environments, choose Connect Codex, pick EU or US and copy the webhook URL.
- Paste the URL into your Agents API environment settings as the sandbox webhook. Add the deploy key or GitHub App and the build secrets.
- Start a Codex session from the Codex app or your workflow and pick the Macswarm environment. Codex requests a Pod when a task needs Xcode or a Simulator; Linux tasks keep using your other sandboxes.
The Codex quickstart covers each step; Codex on a macOS environment explains the webhook route and how it differs from Xcode Cloud. OpenAI bills the model usage; Macswarm bills the Pod-hours. Claude Code and Codex sessions from the same developer share one Pod, and iOS Simulator for coding agents shows the testing loop both run.
What does a cloud Mac cost for one developer?
Assume 88 metered Pod-hours per developer per month, including startup and the ten-minute idle periods, with no more than four Pods running at once. Model usage from Anthropic or OpenAI is on top in every case.
| Option | Assumption | Monthly bill | Work unit |
|---|---|---|---|
| Macswarm Pro | 88 metered Pod-hours; the first 3 are free, once | $99, which is $1.13 an hour at this usage ($99 ÷ 88 metered Pod-hours) and not a posted hourly tariff; $0.33 at the full 300 (pricing) | A Pod-hour: one Pod up for an hour, shared by two to three agents |
| NoMac | 88 hours at the published base rate | $70.40 = 88 × $0.80, billed by the minute, no subscription (NoMac, checked 25 Oct 2026) | A Mac-minute for one agent’s session |
| Rented Mac mini | One machine, on all month whether busy or not | My Remote Mac $85; MacRent $159, excluding VAT; MacRun $169 for the Agent Mac (all checked 25 Oct 2026) | A dedicated Mac mini you operate |
| Xcode Cloud | 88 compute hours | $49.99 for the 100-hour tier (Apple, checked 25 Oct 2026) | A compute hour: a build or test run, not an agent’s working session, so not comparable |
At 88 hours with one agent, NoMac and My Remote Mac cost less than Pro, and a flat $85 Mac stays cheaper than $99 for a single developer as hours rise. Three developers using 88 metered Pod-hours each use 264 Pod-hours, within Pro’s 300 at $99. The same three on one rented Mac each would pay $255 = 3 × $85 at My Remote Mac, $477 = 3 × $159 at MacRent, excluding VAT, or $507 = 3 × $169 at MacRun; on per-minute Macs, $211.20 = 264 × $0.80 at NoMac (all checked 25 Oct 2026). This comparison assumes one separate rented Mac per developer; it does not establish equal build throughput or equivalent isolation.
When is something else the better choice?
- You own a Mac and run one agent at a time. Claude Code Desktop’s Simulator pane and the Codex app already do this on your hardware.
- You want root, a persistent disk and a machine that is yours all month. MacRun, MacRent or My Remote Mac; see Macswarm vs MacRun. Pods have no SSH and keep nothing between sessions.
- You use well under 124 hours a month with one agent. At the published base rate, NoMac costs less than $99 below 123.75 hours ($99 ÷ $0.80); this excludes top-up bonuses (NoMac, checked 25 Oct 2026). See Macswarm vs NoMac.
- You want CI builds and TestFlight distribution from a workflow with no agent in the loop. Xcode Cloud includes 25 compute hours a month with Apple Developer Program membership (Apple, checked 25 Oct 2026). See Macswarm vs Xcode Cloud.
- Your organization has Zero Data Retention or the HIPAA configuration. Anthropic lists self-hosted environments as “unavailable for organizations with Zero Data Retention enabled or with the HIPAA configuration applied” (Self-hosted environments). That restriction is Anthropic’s, and Macswarm cannot lift it.
What do the vendor documents say?
Xcode and Apple’s iOS Simulator run only on macOS, so where a session executes decides whether an agent can build an iOS app. The vendor pages say the following about their own hosted sessions; none of it describes a session that executes on a Macswarm Pod.
Anthropic-hosted sessions. “In Anthropic-hosted environments, each session gets a fresh virtual machine (VM) running Ubuntu 24.04 on x86_64, regardless of your own operating system and CPU architecture” (Configure cloud environments). Its installed tools table lists language runtimes, Docker and two databases, not Xcode, and “Replacing the base image entirely isn’t supported yet.” The Desktop app’s Simulator pane does not change this: “The simulator pane is available in local sessions only. In cloud and SSH sessions, Claude runs on a machine that can’t reach the simulators on your Mac.” (Test iOS apps in the simulator).
Codex Cloud. OpenAI’s current Cloud environments page says “Each cloud task runs in a VM”; it does not specify an operating system or establish Xcode availability. Its predecessor, now labelled Codex Cloud (Legacy), describes “a default container image called universal”, built from a repository that says “we only run the linux/amd64 version”; that legacy image describes a Linux environment.
XcodeBuildMCP. OpenAI’s own Debug in iOS simulator use case goes through XcodeBuildMCP, which requires a Mac with a supported Xcode installation; Pods include the Latest Xcode.
What else do people ask?
Can Claude Code use the iOS Simulator in a cloud session?
Not in an Anthropic-hosted session. Anthropic’s documentation says the Simulator pane “is available in local sessions only. In cloud and SSH sessions, Claude runs on a machine that can’t reach the simulators on your Mac.” A session routed to a Macswarm self-hosted environment runs on a Pod, where the agent builds with xcodebuild, leases a pre-booted Simulator and drives it through XcodeBuildMCP; screenshots land in the dashboard and the pull request. This route needs a Claude Team or Enterprise organization. More in Claude Code self-hosted environments on macOS and iOS Simulator for coding agents.
Do I need a Claude Team plan to use Macswarm?
For the self-hosted environment path, yes: Anthropic offers self-hosted environments to Team and Enterprise organizations, in public beta and off until an Owner turns them on. Pro and Max accounts cannot create one, but can start a Pod on the Free or Pro plan and sign in to Claude Code inside it with their own account. Codex needs an OpenAI account with API access, not a Claude plan.
Can Claude Code and Codex share one Pod?
Yes, for the same developer. One Pod belongs to one developer, and that developer’s Claude Code and Codex sessions share it in separate git worktrees. The build queue has two slots and the Simulator pool three to four devices; neither cares which agent is asking. Two to three active agents per standard Pod are guaranteed; more are allowed and queue for builds and Simulators. Limits and queues has the numbers.
How is a Pod-hour billed?
Per second while a Pod is running. The Pod is destroyed ten minutes after its last session ends, and those ten idle minutes are billed. Pro includes 300 Pod-hours a month for $99, about $0.33 an hour, then $0.40 an hour; Team includes 1,500 for $399, then $0.30. Pro and Team can set a monthly spend cap. Model usage is billed separately by Anthropic or OpenAI; Macswarm never resells tokens. The pricing page lists all four plans.
What happens to my code when the Pod stops?
Sessions are asked to commit and push before they end. Macswarm pushes a rescue branch with any leftover changes before the Pod is destroyed. Pod-local caches, credentials and build products do not persist; the next session starts from a fresh clone of the golden image. Security describes the isolation model.