Skip to content

HarnessContextCompactionTerminatedEvent

NexusLabs.Foundry.MicrosoftAgentFramework

NexusLabs.Foundry.MicrosoftAgentFramework.Progress

HarnessContextCompactionTerminatedEvent Class

One hybrid context compaction/assembly attempt terminated without reaching a dispatchable context — Diagnostics's outcome is Irreducible or ConcurrentMutationLimit. Emitted at most once per assembly attempt that reached the started state, as one of exactly two mutually exclusive terminal events alongside HarnessContextCompactionCompletedEvent — never both for the same attempt. Never emitted for an attempt whose classifier or snapshot-construction phase threw before the HarnessContextCompactionStartedEvent was emitted, and never emitted for exceptional failures (cancellation, binding invalidation, or reducer exception) that propagate directly without producing a structured Irreducible or ConcurrentMutationLimit result. Never carries raw message text, exception text, or classifier output — only the categorical termination reached.

public sealed record HarnessContextCompactionTerminatedEvent : NexusLabs.Foundry.MicrosoftAgentFramework.Progress.IProgressEvent, System.IEquatable<NexusLabs.Foundry.MicrosoftAgentFramework.Progress.HarnessContextCompactionTerminatedEvent>

Inheritance System.Object 🡒 HarnessContextCompactionTerminatedEvent

Implements IProgressEvent, System.IEquatable<HarnessContextCompactionTerminatedEvent>

Constructors

HarnessContextCompactionTerminatedEvent(DateTimeOffset, string, string, string, int, long, Guid, HarnessContextDiagnostics) Constructor

One hybrid context compaction/assembly attempt terminated without reaching a dispatchable context — Diagnostics's outcome is Irreducible or ConcurrentMutationLimit. Emitted at most once per assembly attempt that reached the started state, as one of exactly two mutually exclusive terminal events alongside HarnessContextCompactionCompletedEvent — never both for the same attempt. Never emitted for an attempt whose classifier or snapshot-construction phase threw before the HarnessContextCompactionStartedEvent was emitted, and never emitted for exceptional failures (cancellation, binding invalidation, or reducer exception) that propagate directly without producing a structured Irreducible or ConcurrentMutationLimit result. Never carries raw message text, exception text, or classifier output — only the categorical termination reached.

public HarnessContextCompactionTerminatedEvent(System.DateTimeOffset Timestamp, string WorkflowId, string? AgentId, string? ParentAgentId, int Depth, long SequenceNumber, System.Guid AssemblyId, NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessContextDiagnostics Diagnostics);

Parameters

Timestamp System.DateTimeOffset

When the termination was reached.

WorkflowId System.String

Top-level workflow correlation ID.

AgentId System.String

Which agent emitted this event, or null for workflow-level events.

ParentAgentId System.String

Parent agent ID for sub-agent runs, enabling tree reconstruction.

Depth System.Int32

Nesting depth: 0 = workflow, 1 = agent, 2 = sub-agent, etc.

SequenceNumber System.Int64

Globally ordered sequence number for event ordering.

AssemblyId System.Guid

The identical opaque per-assembly correlation ID carried by the preceding HarnessContextCompactionStartedEvent for this same attempt, so this Terminated event is pairable with its Started event even when other concurrently-running assemblies on the same agent interleave their own events' SequenceNumbers in between.

Diagnostics HarnessContextDiagnostics

The privacy-safe, structured evidence for this termination.

Properties

HarnessContextCompactionTerminatedEvent.AgentId Property

Which agent emitted this event, or null for workflow-level events.

public string? AgentId { get; init; }

Implements AgentId

Property Value

System.String

HarnessContextCompactionTerminatedEvent.AssemblyId Property

The identical opaque per-assembly correlation ID carried by the preceding HarnessContextCompactionStartedEvent for this same attempt, so this Terminated event is pairable with its Started event even when other concurrently-running assemblies on the same agent interleave their own events' SequenceNumbers in between.

public System.Guid AssemblyId { get; init; }

Property Value

System.Guid

HarnessContextCompactionTerminatedEvent.Depth Property

Nesting depth: 0 = workflow, 1 = agent, 2 = sub-agent, etc.

public int Depth { get; init; }

Implements Depth

Property Value

System.Int32

HarnessContextCompactionTerminatedEvent.Diagnostics Property

The privacy-safe, structured evidence for this termination.

public NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessContextDiagnostics Diagnostics { get; init; }

Property Value

HarnessContextDiagnostics

HarnessContextCompactionTerminatedEvent.ParentAgentId Property

Parent agent ID for sub-agent runs, enabling tree reconstruction.

public string? ParentAgentId { get; init; }

Implements ParentAgentId

Property Value

System.String

HarnessContextCompactionTerminatedEvent.SequenceNumber Property

Globally ordered sequence number for event ordering.

public long SequenceNumber { get; init; }

Implements SequenceNumber

Property Value

System.Int64

HarnessContextCompactionTerminatedEvent.Timestamp Property

When the termination was reached.

public System.DateTimeOffset Timestamp { get; init; }

Implements Timestamp

Property Value

System.DateTimeOffset

HarnessContextCompactionTerminatedEvent.WorkflowId Property

Top-level workflow correlation ID.

public string WorkflowId { get; init; }

Implements WorkflowId

Property Value

System.String