public readonly property contextTokens as Int
Current cached context occupancy, read in O(1) on the session owner thread. Appended messages, restored history and compaction use estimates until the next provider response supplies usage. Use contextUsage to publish an immutable snapshot to another thread. Provider usage includes the input summarized by a compactor and must not be mistaken for the size of its replacement context.
Last known active-context size in tokens.
print(session.contextTokens)