Replica

Read history

Reads history from the newest event. Omit limit for everything. To page back, pass the previous before_cursor until it is null. Sleeping and archived replicas return retained history without waking. Returns 409 when a suspended replica has no retained history.

get/v1/replica/{id}/history

Request

  • Base URL
    https://api.replicas.dev
  • URL
    https://api.replicas.dev/v1/replica/{id}/history
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

The unique identifier of the replica

Query parameters

chat_idstring

Filter history to a specific chat

limitinteger

Maximum number of events to return, taken from the end of the history. Omit to return the full history.

before_eventinteger

Exclusive upper bound: return only events with an index below this value. Pass the previous response's eventsStartIndex to fetch the page before it. Indexes are stable as new events append to the end.

before_turninteger

Exclusive upper bound for Codex transcript turns, paged with turnsStartIndex the same way beforeEvent pages events.

before_cursorstring

Opaque cursor from the previous response's beforeCursor. Advances events and Codex turns together.

Headers

X-Replicas-Api-Version'2026-10-07'

API version. 2026-10-07 returns snake_case responses. See versioning.

Response

Successful response

thread_idstring nullable required

Thread/session ID

removed_message_idsstring[]

IDs of canceled queued messages omitted from the history

events_start_indexinteger

Index of the first returned event within the full history. Pass it back as before_event to fetch the preceding page. Absent when the full history was returned.

turns_start_indexinteger

Index of the first returned Codex transcript turn, used with before_turn. Present only when the response includes codex_asp_transcript.

before_cursorstring nullable

Opaque cursor for the next earlier page of events and Codex turns. Null when no earlier page exists.

totalinteger required

Total number of events when known; otherwise the number of events in this page

has_moreboolean required

Whether earlier events exist before this page

coding_agent'claude' | 'codex' | 'cursor' | 'muse' | 'opencode' | 'pi' | 'null' nullable

Currently active coding agent

wakingboolean nullable

Whether the workspace was just woken from a sleeping state. Retry in 30-90 seconds.

codex_asp_transcriptobject nullable

Native Codex ASP transcript when available

Example response

{
  "thread_id": "thread_123",
  "events": [],
  "eventsStartIndex": 120,
  "turnsStartIndex": 0,
  "beforeCursor": "{\"mode\":\"range\",\"events\":\"1048576\",\"turns\":\"4096\"}",
  "total": 170,
  "has_more": true,
  "codexAspTranscript": {
    "turns": []
  },
  "senders": []
}

Changes

No recorded changes to this operation across all 1 revision of this API.