# swarmops queue enqueue

> Release: 0.13.0 · Last changed: 2026-11-18 · Source: https://github.com/KeiaiLab/SwarmOps/blob/stable/docs/reference/commands/queue-enqueue.md

Put a change in REF's landing queue, and start its runner.

The change is HEAD with its first-parent chain since --base. The entry is durable when this answers; a runner then checks and lands it, with no other command. A store before format 3 is E\_FORMAT\_REQUIRED, a change REF holds already E\_NOTHING\_TO\_LAND, and a REF whose head names no check E\_INVALID\_ARG (details.missing: check).

```yaml
title: "swarmops queue enqueue"
description: "Put a change in REF's landing queue, and start its runner."
group: "queue"
since: "0.13.0"
mutates: true
identity_required: true
mcp_tool: "queue_enqueue"
envelope_op: "queue_enqueue"
exit_codes: [0]
errors: []
syntax: "swarmops queue enqueue [OPTIONS] --head <REV> <REF>"
```

## Syntax

```text
swarmops queue enqueue [OPTIONS] --head <REV> <REF>
```

## Required arguments

### `REF`

Syntax: `<REF>`.

The ref to land on, which must exist.

### `--head`

Syntax: `--head <REV>`.

The change's head.

## Optional arguments

The command also takes the [global options](../cli.md#global-options).

### `--base`

Syntax: `--base <REV>`.

Where the change starts: a first-parent ancestor of --head (default: the merge base of --head and REF's head).

### `--key`

Syntax: `--key <KEY>`.

Make a retry safe, at most 128 bytes: the same key with the same change answers the entry it made (replayed); with another change, E\_INVALID\_ARG (key\_reused).

## Examples

### CLI

No recorded example yet.

### MCP

No recorded example yet.

## Return information

`result` is a `QueueEnqueueResp` (`swarmops schema QueueEnqueueResp` prints its JSON Schema).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `entry` | `QueueEntryOut` | yes | The entry. |
| `replayed` | `boolean` | yes | True when the key named an entry already, and nothing was written. |

Envelope `op`: `queue_enqueue`.

Exit codes:

- `0`: Success.

## Errors

No golden step shows this command failing yet.

Any command that opens a store may also fail with a store error, such as [`E_NOT_A_REPO`](../errors.md#e_not_a_repo), [`E_IO`](../errors.md#e_io) or [`E_STORE_CORRUPT`](../errors.md#e_store_corrupt); a command line the grammar refuses is [`E_INVALID_ARG`](../errors.md#e_invalid_arg) (exit 2).

## See also

- [`swarmops queue status`](queue-status.md)
- [`swarmops queue withdraw`](queue-withdraw.md)
- [`swarmops queue wait`](queue-wait.md)
- [`swarmops queue run`](queue-run.md)
- [CLI reference](../cli.md)
- [Error codes](../errors.md)
