MCPcopy Index your code
hub / github.com/github/copilot-sdk / SessionCompactionCompleteData

Struct SessionCompactionCompleteData

go/rpc/zsession_events.go:330–367  ·  view source on GitHub ↗

Conversation compaction results including success status, metrics, and optional error details

Source from the content-addressed store, hash-verified

328
329// Conversation compaction results including success status, metrics, and optional error details
330type SessionCompactionCompleteData struct {
331 // Checkpoint snapshot number created for recovery
332 CheckpointNumber *int64 `json:"checkpointNumber,omitempty"`
333 // File path where the checkpoint was stored
334 CheckpointPath *string `json:"checkpointPath,omitempty"`
335 // Token usage breakdown for the compaction LLM call (aligned with assistant.usage format)
336 CompactionTokensUsed *CompactionCompleteCompactionTokensUsed `json:"compactionTokensUsed,omitempty"`
337 // Token count from non-system messages (user, assistant, tool) after compaction
338 ConversationTokens *int64 `json:"conversationTokens,omitempty"`
339 // User-supplied focus instructions provided to a manual `/compact` invocation. Omitted for automatic compaction and for manual compaction with no focus text.
340 CustomInstructions *string `json:"customInstructions,omitempty"`
341 // Error message if compaction failed
342 Error *string `json:"error,omitempty"`
343 // Number of messages removed during compaction
344 MessagesRemoved *int64 `json:"messagesRemoved,omitempty"`
345 // Total tokens in conversation after compaction
346 PostCompactionTokens *int64 `json:"postCompactionTokens,omitempty"`
347 // Number of messages before compaction
348 PreCompactionMessagesLength *int64 `json:"preCompactionMessagesLength,omitempty"`
349 // Total tokens in conversation before compaction
350 PreCompactionTokens *int64 `json:"preCompactionTokens,omitempty"`
351 // GitHub request tracing ID (x-github-request-id header) for the compaction LLM call
352 RequestID *string `json:"requestId,omitempty"`
353 // Copilot service request ID (x-copilot-service-request-id header) for the compaction LLM call
354 ServiceRequestID *string `json:"serviceRequestId,omitempty"`
355 // For failed compaction only: the HTTP status code of the compaction LLM call failure, when it carried one. Absent for successful compaction and for failures without an HTTP status (e.g. an empty model response or a transport error).
356 StatusCode *int64 `json:"statusCode,omitempty"`
357 // Whether compaction completed successfully
358 Success bool `json:"success"`
359 // LLM-generated summary of the compacted conversation history
360 SummaryContent *string `json:"summaryContent,omitempty"`
361 // Token count from system message(s) after compaction
362 SystemTokens *int64 `json:"systemTokens,omitempty"`
363 // Number of tokens removed during compaction
364 TokensRemoved *int64 `json:"tokensRemoved,omitempty"`
365 // Token count from tool definitions after compaction
366 ToolDefinitionsTokens *int64 `json:"toolDefinitionsTokens,omitempty"`
367}
368
369func (*SessionCompactionCompleteData) sessionEventData() {}
370func (*SessionCompactionCompleteData) Type() SessionEventType {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected