---
title: "Get Pending Messages"
method: GET
path: "/api/chat/sessions/{session_id}/messages/pending"
tags: ["v2", "chat", "chat"]
---

# Get Pending Messages

`GET /api/chat/sessions/{session_id}/messages/pending`

Peek at the pending-message buffer without consuming it.

Returns the current contents of the session's pending message buffer
so the frontend can restore the queued-message indicator after a page
refresh and clear it correctly once a turn drains the buffer.

## Path parameters

- `session_id` string, required

## Response `200`

Successful Response

- PeekPendingMessagesResponse — Response for the pending-message peek (GET) endpoint. Returns a read-only view of the pending buffer — messages are NOT consumed. The frontend uses this to restore the queued-message indicator after a page refresh and to decide when to clear it once a turn has ended.
  - `messages` string[], required
  - `count` integer, required

## Other responses

- `401` — Authentication required
- `404` — Session not found or access denied
- `422` — Validation Error

---

[API](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/significant-gravitas/autogpt-agent-server/versions/382041c7ecb2/schema)
