Chats

Compact chat

Requests a manual context compaction on an idle or errored chat, clearing any stored error. The compaction runs asynchronously through the chat worker and bypasses the automatic usage threshold.

post/api/v2/chats/{chat}/compact

Path parameters

chatstring uuid required

Chat ID

Response

OK

agent_idstring uuid
archivedboolean
build_idstring uuid
client_type'ui' | 'api'
created_atstring date-time
has_unreadboolean

HasUnread is true when assistant messages exist beyond the owner's read cursor, which updates on stream connect and disconnect.

idstring uuid
labelsobject
last_model_config_idstring uuid
last_reasoning_effortstring
last_turn_summarystring
mcp_server_idsstring[]
organization_idstring uuid
owner_idstring uuid
owner_namestring
owner_usernamestring
parent_chat_idstring uuid
pin_orderinteger
plan_mode'plan'
queued_for_capacityboolean

QueuedForCapacity reports that the chat is waiting for a concurrent agent slot. Single-chat reads derive it; list responses leave it false.

root_chat_idstring uuid
sharedboolean

Shared is true when this chat's root chat has explicit user or group ACL entries.

status'waiting' | 'running' | 'error' | 'requires_action' | 'interrupting'
summarystring

Summary is the persisted whole-chat summary, generated in the background. It is nil until the first summary has been produced.

titlestring
updated_atstring date-time
warningsstring[]
workspace_idstring uuid

Changes