{"version":"2.1.281","anchor":"scaffold-template-for-a-plugin-sessionstart-hook","canonical_anchor":"scaffold-template-for-a-plugin-sessionstart-hook","heading":"Scaffold template for a plugin SessionStart hook","tier":null,"area":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/scaffold-template-for-a-plugin-sessionstart-hook","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### Scaffold template for a plugin SessionStart hook\n\nClaude Code now has a starter template for a plugin hook that runs when a session begins\n\n**Unclear.** The finding does not say which command or action produces this template.\n\n**What**\n\nA hook is a command that runs automatically at a certain moment. Claude Code now includes a starter template of hook settings for a plugin. It sets up a `SessionStart` hook, which runs when a session begins or resumes. The hook runs this command:\n\n`bun \"${CLAUDE_PLUGIN_ROOT}\/hooks-handlers\/on-session-start.ts\"`\n\n`${CLAUDE_PLUGIN_ROOT}` stands for the plugin's own folder, and `bun` is the program that runs the script. The function that now produces this template used to make temporary `.incoming-` file paths.\n\n**Why**\n\nPlugin authors get a ready-made starting point for code that runs at the start of each session."}