---
title: "Report Brain Presence"
method: PUT
path: "/api/rooster/worker/presence"
tags: ["rooster"]
---

# Report Brain Presence

`PUT /api/rooster/worker/presence`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/rooster/worker/presence`
- Auth: none declared

The brain's worker says what it has in flight, every tick, so a deploy can wait for it.

Frederick, 2026-10-23 (issue #7126), after a Slack answer died under a deploy's SIGTERM: "Why is the
brain stuck in the deployment process to get restarted every single time we deploy code?" The
deployer repoints the `rooster` service only when his own code changed, and before it does it asks
the worker to drain and reads `turns_in_flight` off `GET /api/health/build-floor`, which relays this
report (`settings_service.brain_presence`). Called by `tools/rooster_worker/worker.py`
`report_presence` on the same `rooster:seat:probe` grant the container's seat probe already reports
through (`/seat/probe-result`): both are the container reporting about itself, and a new grant would
need the service token minted again by hand (`mint_service_token.GRANTS`).
Ruling `docs/01_decisions/rulings/2026-10-23-the-brain-is-out-of-the-deploy-flow.md`.

## Request body

- BrainPresenceReport: What the worker has in flight right now. See `settings_service.ROOSTER_BRAIN_PRESENCE`.
  - `turns_in_flight` integer, required
  - `draining` boolean
  - `surfaces` object

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-24** `e2a5aa942e6f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/changes/api/rooster/worker/presence/put.md)

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
