/** * The size of the context a Claude Code session is carrying right now, read from * the tail of its transcript. See docs/DATA_SOURCES.md ยง2.12. * * Every turn re-sends the whole conversation, so the LAST real assistant turn's * input side -- fresh input plus cache reads plus cache writes -- is how many * tokens the next message will re-read. This is not a usage total and is never * stored: it is a gauge of the moment, which is why it reads the file directly * and neither syncs nor touches the database. */ /** Tail window the first read covers; each retry multiplies it by GROWTH. */ export declare const INITIAL_WINDOW_BYTES: number; /** * The context size in tokens, or `null` when it cannot be known. * * Unknown is a real answer, not a failure, and is never replaced with an older * number: * - a `compact_boundary` line AFTER the last assistant usage means the context * was just compacted and no turn has measured the new one. The last usage * still describes the PRE-compact context (seen live: 458k shown when the real * context was ~73k), so it must not be reported; * - an unreadable, missing or empty transcript, or one with no usable turn yet. * * Never throws: it runs inside a status line and a prompt hook, and neither may * fail on a transcript it cannot read. */ export declare function readContextSize(transcriptPath: string, options?: { initialWindowBytes?: number; }): number | null;