Group of 2 Under the hood
Claude Code now reports context-usage and artifact-count metadata back to SDK-hosted sessions
What
- SDK-hosted sessions now report
context_usageandartifactscount metadata back to the session's outbound handle, deduplicated against the last-reported values, with a suppression flag for artifacts. - The underlying state tracking gained matching fields,
lastReportedContextUsage,lastKnownContextUsage,lastReportedArtifacts,lastKnownArtifacts, andartifactsEgressSuppressed, used consistently across the relevant reset paths.
Why This lets tools and integrations built on the Claude Code SDK see how much context a session is using and how many artifacts it has produced, without re-sending duplicate metadata.