{"version":"2.1.281","anchor":"hooks-api-sessionversion-call","canonical_anchor":"hooks-api-sessionversion-call","heading":"Hooks API: session.version call","tier":null,"area":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/hooks-api-sessionversion-call","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### Hooks API: session.version call\n\nPlugin function hooks can now call session.version to get the running build's version, build time and git commit\n\n**What**\n\nPlugins, 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`).\n\n**Why**\n\nA 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."}