New features / v2.1.280
Hook output size in OpenTelemetry events
CHANGELOG · original
Added hook output sizes and the number of oversized outputs saved to a file to the hook_execution_complete OpenTelemetry event Open official changelog ↗ Documentation
Documentation excerpt
Hook execution complete event
Logged when all hooks for a hook event have finished.
Event Name: claude_code.hook_execution_complete
Attributes:
- All standard attributes
event.name:"hook_execution_complete"event.timestamp: ISO 8601 timestampevent.sequence: per-process counter for ordering events, described under Event correlation attributeshook_event: Hook event typehook_name: Full hook name including matchernum_hooks: Number of matching hook commandsnum_success: Count that completed successfullynum_blocking: Count that returned a blocking decisionnum_non_blocking_error: Count that failed without blockingnum_cancelled: Count cancelled before completiontotal_duration_ms: Wall-clock duration of all matching hooksstdout_chars: Total characters of stdout across the matching hooks that succeeded. Requires Claude Code v2.1.280 or lateradditional_context_chars: Total characters ofadditionalContextreturned by the matching hooks. Requires Claude Code v2.1.280 or latersystem_message_chars: Total characters ofsystemMessagereturned by the matching hooks. Requires Claude Code v2.1.280 or laterinitial_user_message_chars: Total characters ofinitialUserMessagereturned by the matching hooks. Requires Claude Code v2.1.280 or laternum_outputs_persisted: Number of hook outputs over the 10,000-character cap that Claude Code saved to a file. Requires Claude Code v2.1.280 or latermanaged_only:"true"when only managed-policy hooks are permittedhook_source:"policySettings"or"merged"safe_mode:"true"when the session was started with--safe-mode,"false"otherwise. Requires Claude Code v2.1.169 or laterhook_definitions: JSON-serialized hook configuration. Included only when both detailed beta tracing andOTEL_LOG_TOOL_DETAILS=1are enabled
Documentation snapshot · 2026-09-23