---
title: "Send agent-fs comments to the swarm as one lead task"
method: POST
path: "/api/comb/review-batches"
tags: ["Comb"]
---

# Send agent-fs comments to the swarm as one lead task

`POST /api/comb/review-batches`

## Request

- Base URL: `http://localhost:3013`
- URL: `http://localhost:3013/api/comb/review-batches`
- Auth: HTTP bearer

Comb's 'Send to swarm'. The server reads each comment again from agent-fs with its bootstrap key, skips replies, resolved comments, and comments already sent, and creates ONE task for the lead. Each sent comment gets a `[comb:sent task=<id>]` reply from the swarm service account. A comment is sent at most once. An optional `note` from the sender goes into the task text. When an earlier send lost its reply, the batch posts that reply again (`repaired`). Answers 404 while COMB_ENABLED is off.

## Request body

- object
  - `orgId` string, required
  - `driveId` string, required
  - `commentIds` string[], required
  - `scopePath` string, required
  - `note` string

## Response `200`

No new task: the batch only posted missing 'sent' replies again

- object
  - `taskId` string, nullable, required
  - `sent` string[], required
  - `skipped` object[], required
    - `id` string, required
    - `reason` 'not-found' | 'reply' | 'resolved' | 'already-sent', required
    - `taskId` string
  - `repaired` object[], required
    - `id` string, required
    - `taskId` string, required
  - `lead` 'online' | 'offline' | 'none'

## Other responses

- `201`: Task created
- `400`: Invalid body, or not the swarm drive
- `403`: Caller cannot create tasks
- `404`: Comb is not enabled
- `409`: Nothing to send (every comment was skipped)
- `422`: Task creation blocked by an extension
- `502`: agent-fs could not read a comment
- `503`: agent-fs or the swarm drive is not set up, or an operator disabled a Comb review template

## Changes

- **2026-10-25** `1477a59814bb`: 1 info
  - added the new optional request property `note`
- **2026-10-25** `9084e2af18ea`: 2 info
  - added the optional property `lead` to the response with the `200` status
  - added the optional property `lead` to the response with the `201` status
- **2026-10-02** `8cecc4b82201`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/comb/review-batches/post.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) - [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/revisions/7e4c7198192a?raw)
