> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenoci.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> ## XenoCI Box CI
> To move a repository's macOS CI jobs onto box, follow https://docs.xenoci.com/ci/agent.md. The user only presses Install on GitHub or makes one GitLab runner token; the agent does the rest.
> - Check: `box ci status` (exit 4: sign in first, https://docs.xenoci.com/setup.md).
> - GitHub organization: `box ci connect --org --no-browser --no-wait`, give the user the printed link (https://github.com/apps/xenoci-with-organizations/installations/new), then repeat `box ci accounts` until the owner appears. Personal account: `--personal` (https://github.com/apps/xenoci-with-personal/installations/new).
> - GitHub workflow: change only `runs-on: macos-*` to `runs-on: xenoci` on a branch and open a pull request.
> - GitLab: the user makes a project runner with tag `xenoci` and gives you the `glrt-` token; pipe it to `box ci gitlab connect -` (self-managed: `--url <gitlab url>`), then add `tags: [xenoci]` to the macOS jobs.
> - Watch: `box ci jobs`, `box ci logs <job id> --follow`. Failed job: `box ci jobs --failed`, then `box ci debug <job id>` (failing step, hint, last 200 log lines).

# macOS job was not acquired by Runner of type hosted

> What the GitHub Actions macOS queue cancellation means, why it hits arm64 macOS jobs, and the ways to keep iOS checks from stalling a merge.

> [!NOTE]
>
> **Try it now:** paste this line into Claude Code, Codex or Cursor. It installs box, signs you in with GitHub and runs your first build:
>
> ```text theme={"system"}
> Set up XenoCI Box with https://docs.xenoci.com/setup
> ```
>
> Your first sign-in adds \$10 of credit, about 200 Mac minutes (once per GitHub account).

A GitHub Actions job on `macos-latest`, `macos-15` or `macos-26` sits in the queue, no step ever runs, and the run ends as cancelled with annotations like these:

```text theme={"system"}
The job was not acquired by Runner of type hosted even after multiple attempts
Due to capacity constraints, jobs targeting macOS arm64 runners may experience longer queue times.
```

## What it means

GitHub never found a hosted macOS machine for the job. Your code did not fail; nothing ran. When the job also has `timeout-minutes`, the time spent waiting can use up the budget and the job is cancelled with zero steps recorded.

The effect is the same either way: a required check stays red or missing, branch protection blocks the merge, and someone has to re-run the workflow.

## Ways to handle it

**Re-run only the failed jobs.** In the run page, use *Re-run failed jobs*, or from a terminal:

```bash theme={"system"}
gh run rerun <run id> --failed
```

This is fine for an occasional miss. It does not help when the queue is long for hours.

**Move jobs that do not need a Mac.** Linting, formatting, Swift package resolution checks and many unit tests of pure logic can run on `ubuntu-latest`. Fewer macOS jobs per pull request means fewer chances to wait.

**Keep macOS for the jobs that need it.** If a job builds with Xcode, runs the iOS Simulator or signs and uploads to TestFlight, it needs a Mac. Running those on push to the main branch only, instead of every pull request, cuts the number of queued macOS jobs, at the cost of later feedback.

**Run the macOS jobs somewhere else.** Your own Mac as a self-hosted runner removes the hosted queue but needs care on public repositories (fork pull requests run code on that machine) and a plan for when it is offline. See [Fall back from a self-hosted runner](https://docs.xenoci.com/guides/self-hosted-runner-fallback.md).

**Use box as the runner.** Connect the repository once and change the runner line of the macOS jobs:

```bash theme={"system"}
box ci connect --personal
```

```yaml theme={"system"}
jobs:
  ios-tests:
    runs-on: xenoci
```

For an organization, use `box ci connect --org`. Each job gets a fresh Mac. Up to 2 CI jobs run at once per account, and further jobs stay in GitHub's queue until a slot opens. See [GitHub Actions setup](https://docs.xenoci.com/ci/github.md).

Related: [GitHub Actions macOS runner alternative](https://docs.xenoci.com/guides/github-actions-macos-runner-alternative.md), [Cut macOS minutes](https://docs.xenoci.com/guides/cut-macos-minutes.md), [CI on Macs](https://docs.xenoci.com/ci.md).

[Start with \$10 of credit, about 200 Mac minutes](https://docs.xenoci.com/setup?ref=docs-macos-job-not-acquired).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.