Skip to main content
During a long task, an Agent may summarize or prune its context. Open Context compaction to see whether a rewrite took effect and how much the context changed. Follow the source link to verify the original event.
This Beta enhanced view requires native OTel / SigNoz trace details with the compaction card. External Langfuse data sources do not currently provide it. If the entry is absent, check the frontend version. See official Hermes Relay integration for collection prerequisites.

1. Find the card for your task

  1. Open Observation → Agent traces. Select the correct space, Hermes Agent and time window for your new task.
  2. Open its native Trace and verify the Trace ID, model and task content. Select Enhanced, then find Context compaction under Preview on the right.
  3. You can also select a span containing a compaction event and inspect its card in node details. Both views retain source links.
Inspect the current Trace without creating another collection project. The card appears when the task reports a recognizable compaction event.
One attempt kept the original context. The applied attempt reduced the estimated count from 7,282 to 3,037 tokens.Dark-theme view of the skipped and applied attempts, with estimated counts of 7,282 before and 3,037 after compaction.

A real Hermes run using Baidu GLM 5.3. One attempt kept the original context and one applied compaction. Click to enlarge.

2. Check the outcome before the numbers

The header shows how many attempts applied compaction, followed by the total number of attempts. Check each record for its outcome and any reported reason. For applied compaction, Context size shows the reported before and after counts. In the example, the count drops from 7,282 to 3,037 tokens, a decrease of 4,245 tokens. Estimated token counts means the figures are based on message content. Use them to compare context size. Billed usage is tracked separately. When the record has only one count, the card shows only that count. If counts disagree, open the details to check the reported fields. An explicitly reported 0 tokens, 0 ms, or No remains distinct from missing data. Review the full text and answer quality separately. The compaction event does not add another model call. If compaction used a model to generate a summary, inspect the collected summary-model span’s own usage; do not count the event again. See Token accounting.

3. Open more recorded details

Select View details to inspect reported fields such as the method, trigger, elapsed time, summarizer model, and attempt ID. Message counts and the token measurement method are also available when reported. Records in a Trace are ordered by event time. The initial view shows at most five; use the load-more, show-all and collapse controls for a longer list. One attempt can have multiple source projections. Display merging retains those sources and does not join attempts across Traces or sessions. A session ID in an event does not establish membership for other Traces.

4. Follow the original event

  1. Expand View details, then select a link under Source: Relay span event.
  2. The UI selects the source span, expands Events and focuses the exact original event. Verify the span ID, event number, name and timestamp.
  3. Inspect nemo_relay.mark.data.* fields to match the outcome, measurements and reason. Select Original in the toolbar when you need original content. Enhanced cards disappear; original attributes and events remain readable.
Original compaction event focused through its source linkFocused original compaction event in dark theme

The source link focuses the original compaction event. Local replay of a separate verified Hermes run. Click to enlarge.

When the card or fields are missing

If original Trace content is also missing, start with Trace troubleshooting or No data before interpreting compaction.