---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/context/thrift/subtractive_pass/interfaces/ThriftTrace.md
description: >-
  The full record of one subtractive pass — before/after weights per bucket, and
  whether the dispatch ultimately fits the budget.
---

# Interface: ThriftTrace

Defined in: [src/batteries/context/thrift/subtractive\_pass.ts:121](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L121)

The full record of one subtractive pass — before/after weights per bucket, and whether the
dispatch ultimately fits the budget.

## Properties

| Property                                            | Type                              | Description                                                                                                                                                                                      | Defined in                                                                                                                                                        |
| --------------------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|  `buckets`             | [`BucketTrace`](BucketTrace.md)\[] | One entry per step of the pass, in the order the steps ran, for diagnostics/tracing.                                                                                                             | [src/batteries/context/thrift/subtractive\_pass.ts:138](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L138) |
|  `budget`               | `number`                          | The INPUT token budget — `contextWindow - reserve`.                                                                                                                                              | [src/batteries/context/thrift/subtractive\_pass.ts:127](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L127) |
|  `contextWindow` | `number`                          | The active model's context window this pass was run against.                                                                                                                                     | [src/batteries/context/thrift/subtractive\_pass.ts:123](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L123) |
|  `fits`                   | `boolean`                         | Whether `totalAfter` fits within `budget`.                                                                                                                                                       | [src/batteries/context/thrift/subtractive\_pass.ts:133](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L133) |
|  `refused`             | `boolean`                         | The dispatch should be refused: `!fits` — even after every possible shed, the irreducible floor (system prompt + standing instructions + newest turn + output reserve) still exceeds the window. | [src/batteries/context/thrift/subtractive\_pass.ts:136](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L136) |
|  `reserve`             | `number`                          | Tokens held back for the model's own output (see [resolveBudget](../functions/resolveBudget.md)).                                                                                                | [src/batteries/context/thrift/subtractive\_pass.ts:125](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L125) |
|  `totalAfter`       | `number`                          | Total measured token weight AFTER every shedding step ran.                                                                                                                                       | [src/batteries/context/thrift/subtractive\_pass.ts:131](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L131) |
|  `totalBefore`     | `number`                          | Total measured token weight BEFORE any shedding (the "everything reasonable" starting point).                                                                                                    | [src/batteries/context/thrift/subtractive\_pass.ts:129](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L129) |
