pending_stalled_work_units / pending_ready_work_units split tells you
why pending work isn’t moving: stalled items are sitting below the deriver’s
batch token threshold waiting for more messages, while ready items are eligible
to be picked up by a worker. The two always sum to pending_work_units.
Whenever a message is sent it will generate several tasks. These could
be tasks such as generating insights, cleaning up a representation, summarizing
a conversation etc. These tasks are defined based on who is sending the
message, what session the message is in, and potentially who is observing the
message. We call the combination of these parameters a work_unit
This has a few different implications.
- tasks within the same work_unit are processed sequentially, but multiple work_units will be processed in parallel
- If local representations are turned in a Session then a message will
generate an additional work unit for every peer that has
observe_others=True
Tracked task types
The queue status endpoint reports on the following task types:
Internal infrastructure tasks (such as webhook delivery, resource deletion, and
vector reconciliation) are not included in queue status counts.
Completed counts are not lifetime totals. Honcho periodically cleans up
processed queue items to keep the queue table lean. As a result,
completed_work_units reflects items completed since the last cleanup cycle,
not the total number of items ever processed.queue_status method can take additional
parameters to scope the status to a specific work unit:
Inspecting individual work units
When the aggregate counts tell you “something is stalled” but not which work units are stalled, usequeue_work_units / queueWorkUnits. It returns
one row per unprocessed work unit with the token totals, in-progress flag,
and threshold classification needed to debug “why isn’t this advancing?”.
The two endpoints count at different granularities.
queue/status counts
individual queue items (one per message awaiting processing), while
queue/work-units returns one row per work unit — items sharing a
work_unit_key collapse into a single row. So a status response reporting
pending_work_units: 3 can correspond to a single row (total: 1) here when
those three items belong to the same work unit.Cursor pagination
The endpoint is cursor-paginated, not offset-paginated. The queue mutates rapidly (workers claim and complete items continuously), and offset pagination would skip rows that were processed between fetches. Cursor pagination uses opaque tokens (next_page / previous_page) that are stable across these
mutations.
Pass cursor and optionally size to fetch a specific page, or use the
helpers on the returned page object to navigate.
Per-work-unit fields
Each page also carries the deriver’s threshold configuration so you can
interpret per-row classification without re-querying server settings: