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

# Jobs

> Coordinate multiple tasks across agents

A job coordinates multiple related tasks across one or more agents. Jobs enable complex operations that require multiple agents (different specialists handling different aspects), sequential execution (tasks that depend on prior completion), parallel operations (simultaneous execution across multiple hosts), or complex workflows (gateway-generated work split into coordinated subtasks).

![Jobs list](https://mintcdn.com/2501/Nw-5R3i4HUHiTxUb/images/jobs_list.png?fit=max\&auto=format\&n=Nw-5R3i4HUHiTxUb\&q=85\&s=7d35d1208fda12876c638dc4d286bab4)

Jobs list: every job carries a status, its request, its source (the gateway and ticket number), and when it was created. Click a row to open the job.

## Organization Scoping

Jobs are scoped to a specific [organization](https://docs.2501.ai/0.21/core-concepts/organizations.md). All tasks within a job belong to the same organization, and only agents within that organization can be assigned to the job's tasks.

## Job Creation

Jobs are created by [Gateways](https://docs.2501.ai/0.21/core-concepts/gateways.md) when integrated systems generate work requiring multi-agent coordination (e.g., one agent provisions infrastructure, another deploys applications), host fleet operations (e.g., rolling updates across multiple servers), or dependency chains (e.g., database migration must complete before application restart).

You can also create a job yourself: on the **Jobs** page, click **New Job** and describe what you want done. By default, each agent uses its own [execution mode](https://docs.2501.ai/0.21/core-concepts/agents.md#execution-modes-plan-and-auto). Select **Plan** to force Plan on all of them, or **Auto** when an Admin allows it, instead of **Each agent's mode**. 2501 plans the work, picks the hosts and agents, and runs it like any other job. A job created this way has no ticket, so its tasks, its plan and its result are shown on the job page, and once it finishes you create a new job rather than reopening it. Auditors cannot create jobs.

Recurring schedules also create jobs: each scheduled run spawns a fresh job that follows the normal lifecycle. See [Job Schedules](https://docs.2501.ai/0.21/core-concepts/job-schedules.md) for how schedules are registered, paused, and managed.

## Job Orchestration

When a gateway creates a job, it decomposes the task by splitting complex work into individual tasks. Each task is assigned to the appropriate agent based on specialty alignment, host accessibility and credentials, and agent availability and workload. Tasks execute according to dependencies, where sequential tasks wait for predecessors to complete while parallel tasks execute simultaneously where possible. Job status reflects aggregate task states.

## Multiple Hosts, One Job

A job runs on several hosts at once. It runs its tasks in turns. In each turn, every task that is ready to start runs, one for each host. The next turn starts when all these tasks have ended.

A change that agents of one specialty make on two or more hosts goes out in batches, one batch for each turn:

1. The first batch goes to 1 host.
2. Each next batch goes to at most twice the number of hosts where the last batch completed the change.
3. If the change completed on no host, the next batch tries the same hosts again and adds 1 new host. A fault on one host does not stop the change.
4. After the change fails on 3 hosts, the next batches try only those hosts again and add no new host.

For example, a patch across 20 hosts goes to 1, 2, 4, 8 and then 5 hosts. That is 5 turns when every host completes.

A separate change, such as the fix of one team in an incident, has no batches. It starts when its host has no open task. It completes with its report, also when it leaves a step for a person.

Two changes in one ticket go out side by side, each in its own batches. After each batch, the job reads the failures before it starts the next batch, and a broken change goes no further. A check that changes nothing runs on all its hosts in one turn. While the job runs, the gateway posts one ticket comment for each turn, with the number of hosts done, failed and not started. See [Agentic Flow](https://docs.2501.ai/0.21/understand/agentic-flow.md) for how turns continue within license and context limits.

When a host fails, times out, or is stopped, work on the other hosts continues. In the API, the `failure_kind` of a failed task gives the cause when 2501 knows it: `host_unreachable` when the host could not be reached, `llm_failed` when the model failed after its retries, and `engine_error` when 2501 itself failed, such as on a database error. A later task replaces a failure only when it does the same work. A change that reached some of its hosts makes the job partial, also when it failed on others, and the answer groups the failures by cause. Work whose steps need each other, such as an install and its activation, fails the job when one step fails.

When the tasks find a fault that only a person can fix, such as a cut cable or a line down at the carrier, the job ends partial, so the ticket is not resolved, and it goes to the [escalation group](https://docs.2501.ai/0.21/core-concepts/gateways.md#escalation-groups) when one is set.

From a task's stop dialog or the AI Assistant, you choose to stop just that task - which drops its host from the job while the rest continues - or stop the whole job, which cancels every open task and fails the job. See [Tasks - Task Management](https://docs.2501.ai/0.21/core-concepts/tasks.md#task-management).

A job stopped by a person, or that fails outside its steps, writes its ending to its ticket within a few minutes: an internal note with the reason, followed by a hand-off to the [escalation group](https://docs.2501.ai/0.21/core-concepts/gateways.md#escalation-groups) when one is configured, or what your outbound prompt says. See [Rules for stopped jobs](https://docs.2501.ai/0.21/prompting/gateway.md#rules-for-stopped-jobs).

## Execution Mode

Each task of a job has the [execution mode](https://docs.2501.ai/0.21/core-concepts/agents.md#execution-modes-plan-and-auto) of its agent: an agent in Auto makes changes without approval, and an agent in Plan only reads. A job can also force one mode on all its agents:

| Job mode | Set by | Tasks |
| - | - | - |
| None (default) | No command | Each task has the mode of its agent |
| Plan | `@2501:plan`, the New Job form, the job page, or a job schedule | Read-only, whatever the mode of the agent |
| Auto | `@2501:auto`, the New Job form, the job page, or a job schedule, when an Admin allows it | May apply fixes, also through an agent in Plan |

On the job page, the **Mode** button shows the current mode of the job. Admins and Users click it to change the mode of a job that has not ended. The job uses the new mode from its next turn. A job that moves to Plan while a task runs then posts a plan for the change that is left. When a job that waits for approval moves to Auto, its plan closes, and 2501 makes the changes without approval. The last change wins: a later comment without a mode command keeps the mode.

When a new turn has tasks to start, the job first checks the tenant's task allowance. If the license expired or its allowance is exhausted, the job ends partial and states why. Tasks already admitted finish, even when that turn exceeds the remaining allowance. This also applies to approved plan steps.

A host is done only when all its changes and checks completed, with no requested operation waiting. When a job makes a change, the counts are given for each change, and the checks get their own count: a host where only a check ran is not done for the change. When a job makes two changes, such as a patch and then a certificate renewal, a host where the patch completed counts as done for the patch, and as not started for the renewal. A completed change or unrelated check does not clear a failed check. A retry of the same check must complete.

Before a change task completes, 2501 requires evidence that the change is in effect. For a service change, it also requires a functional service check after the change. A running process or successful restart alone is insufficient.

For a service change, verification checks that the affected service uses the new file or library. An HTTP status code alone cannot prove this.

A shared library does not expand the task to unrelated services. A failed check does not authorize a restart. If an operational rule prevents activation, the task cannot report the change as complete. Changes without a service need evidence of the requested state. Missing or failed verification blocks the claim that the change is in effect. The verifier blocks one claim in each request: the task can repair the result and check again, and its next claim completes without verification. So a change that is not in effect can complete when the task claims it again, and it can then increase the next batch. A change of a batch that gives up ends as failed, and a separate change ends with its report.

A task that only checks is read-only, also in **Auto** mode.

## Plans

After the turn in which a job first reads through an agent in Plan, it makes no more changes before your approval. It keeps reading, through any agent, until nothing is left to read. Each agent reads at most once, and two agents of one host read one turn after the other. When a change is still needed, it posts a **plan** with every change that is left, and waits with the status **Waiting for approval**. When no change is needed, it only answers, and ends as a success.

A job with an agent in Plan also posts a plan when it finds no task to run first, for example when the ticket only asks for a change. That plan comes from the request alone. When such a job only answers, it ends with no action, and the ticket says why.

A plan uses the request, task results, operational rules and the descriptions of the hosts that the job read or that the plan changes. It says what 2501 found, why it needs each change, and what it is not sure about. Each step is one change on one host through one agent. The steps are numbered in order, and a step that runs together with an earlier step says so, such as "together with step 1". A change still goes to its hosts in batches, so its steps past the batch wait for a later turn. 2501 picks the agent of each step in the same order as for a task: first the routing rules of the gateway, then an agent that you name in a comment or on the job page, then the specialty that covers the change. Each step shows the name of its agent, so you can name one of several agents with the same specialty. 2501 runs each step as a new task, and never adds a change to a task that it already has. A host runs one task at a time, so two steps on the same host run one after the other. The plan also lists the changes that the job already made. 2501 posts each version of the plan in the ticket, and shows it on the job page.

To answer a plan:

* **Approve it** with `@2501:approve-plan` in the ticket, or **Approve plan** on the job page. Nothing else approves: "looks good, go ahead" is not an approval.
* **Ask for changes** with a `@2501` comment that says what to change, or **Request changes** on the job page. 2501 posts a new version. A question gets an answer, and the same version keeps waiting.

An approval counts only for the version you read. In the ticket, that is the last version that 2501 posted before your comment. On the job page, it is the version on the page. After the approval, 2501 starts only the steps of the plan, and tells the agent of each step to make only its own change. A step first reads what its change sets, such as a file or a setting, so a change that someone made while the plan waited is not made again. A reload or a restart in the step still runs. When a step fails or needs another change, no other step starts, and 2501 posts a new version or only answers. A plan has no time limit, and stopping the job discards it. On the job page, Admins and Users can answer a plan, and Auditors can only read it. In the ticket, every person who can write in it can approve the plan.

Operational rules still apply after plan approval. If a rule requires separate change-control approval, approving the plan does not replace it. Each command of a step is checked against the approved change and the rules. A command that does something else is blocked, and the agent can then run the approved change exactly as written. When a rule forbids the approved change itself, the step stops and says why, and no other step starts.

## Job Monitoring

Jobs are visible only through the Command Center UI, showing job overview (status), the list of tasks within the job with their individual states, and links to the originating ticket and any recurring schedule.

The Job page shows the task counts of the whole job. Use the status filter to show only failed, open, completed or canceled tasks.

Tasks for the same named operation, such as a patch, appear together in one group across hosts and turns. Each group counts its tasks in all turns, and the status filter does not change these counts. Groups with failures appear first, and failed tasks appear first inside each group. Each task shows its turn. Tasks without a named operation appear under **Other tasks**. Counts include retries as separate tasks, but not a task that could not reach its host once another task replaces it, or a task that 2501 canceled on its own.

A group starts collapsed. A group with a task that has not ended expands automatically, so the work in progress is visible. Select a group to expand or collapse it. An expanded group shows 50 tasks at a time. Use **Previous** and **Next** to read more, or open a task for its full details. If there are no named operations, all tasks appear in one list with failures first.

Use **Older** and **Newer** to read the activity timeline.

## Task-Job Relationship

When viewing a task in Command Center, tasks linked to a job display the job identifier. Navigate to the parent job to see all related tasks and understand the broader context within the workflow. This visibility helps troubleshoot multi-task operations by understanding which tasks succeeded, failed, or are pending.

## Troubleshooting

**Job Tasks Not Coordinating:** Review job configuration and task dependencies. Check agent availability and workload. Verify each agent has appropriate credentials and access. Examine individual task failures that may be blocking downstream tasks.

For advanced task orchestration through integrations, see [Gateways](https://docs.2501.ai/0.21/core-concepts/gateways.md). For agent configuration affecting task execution, see [Agents](https://docs.2501.ai/0.21/core-concepts/agents.md), [Specialties](https://docs.2501.ai/0.21/configure/specialties.md), and [Operational Rules](https://docs.2501.ai/0.21/configure/operational-rules.md).


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