What
Plugins, which are add-on packages for Claude Code, can include function hooks: pieces of code that Claude Code runs at set moments. These hooks talk to the current session through a small set of allowed calls. That set now includes version(), which calls session.version and returns information about the running build, such as its version number (VERSION), when it was built (BUILD_TIME) and the git commit it was built from (GIT_SHA).
Why
A plugin hook can now check exactly which build of Claude Code it is running under, which is useful when its behaviour needs to depend on the version.