v1.0.6-preview.1
Pre-release
Pre-release
Feature: experimental context attribution APIs
Two new experimental methods on session.metadata provide per-source token attribution for the session's context window. (#1886)
getContextAttribution() returns a flat list of attribution entries — skills, subagents, MCP servers, tools, plugins — each with a token count and hierarchical nesting via parentId. getContextHeaviestMessages() returns the largest individual messages currently in context, most-expensive first.
const attr = await session.metadata.getContextAttribution();
// attr.contextAttribution.entries → [{ kind: 'skill', id: 'skill:tmux', tokens: 1234, ... }, ...]
const heavy = await session.metadata.getContextHeaviestMessages({ limit: 10 });var attr = await session.Metadata.GetContextAttributionAsync();
var heavy = await session.Metadata.GetContextHeaviestMessagesAsync(limit: 10);Other changes
- feature:
SlashCommandInputnow supports an optionalchoicesfield, allowing slash commands to declare selectable literal options with human-facing descriptions (#1886) - feature:
ExternalToolTextResultForLlmnow supportstoolReferencesfor returning deferred tool names to the model from a tool-search override (#1886)
Generated by Release Changelog Generator · claude-sonnet-4.6
Generated by Release Changelog Generator · sonnet46 1.8M