pub struct HarnessCost {
pub usd: f64,
pub lower_bound: bool,
pub as_of: Option<SystemTime>,
pub current: bool,
}Expand description
A harness’s own running total for a session, read from its transcript.
Claude Code writes one; the other harnesses do not, or (OpenCode, Kodelet)
their costs are already the row’s cost_usd.
It is a different measurement from cost_usd, not a correction to it: it
is priced at the harness’s private table, and it includes requests the
transcript never records. Claude Code writes it when a session exits, so
while a session runs it is the figure from the last exit.
Fields§
§usd: f64§lower_bound: boolThe harness said some of its usage had no price, so usd is a floor.
as_of: Option<SystemTime>The timestamp of the last transcript line before the record, which carries none of its own.
current: boolNo usage has been recorded since, in the transcript or a subagent’s.
False for a live session that has done anything since it last exited:
usd leaves that out.