Skip to main content

Module context

Module context 

Source

Structs§

Agent
Context
Typed representation of the complete Claude Code session JSON payload. All fields are Option<T> because Claude Code may omit any field depending on session state, mode flags, and version. deny_unknown_fields is intentionally NOT used — future Claude Code versions may add fields.
ContextWindow
Cost
CurrentUsage
Effort
Model
OutputStyle
RateLimitPeriod
RateLimits
Vim
Workspace

Functions§

from_reader
Deserialize Claude Code session JSON from any reader. Uses exactly one serde_json::from_str call — no per-field parsing.
from_stdin
Read stdin to end, then deserialize as Claude Code session JSON. This is the ONLY place in the entire codebase that reads from stdin.