{"version":"2.1.334","anchor":"hook-awaiting-and-late-sessionstart-hooks","canonical_anchor":"hook-awaiting-and-late-sessionstart-hooks","heading":"SessionStart hooks can run late for plugins that load after startup","tier":"notice","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/hook-awaiting-and-late-sessionstart-hooks","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### SessionStart hooks can run late for plugins that load after startup\n\nSessionStart hooks from plugins that load late can now run, and their output can arrive before the next request to the model\n\n**What**\n\nA hook is a command you or a plugin set up to run automatically at a certain moment. `SessionStart` hooks run when a session begins or resumes. Plugins that finish loading after startup now get this moment too:\n\n- `SessionStart` now also loads plugin hooks and records which plugins were offered.\n\n- A new `onStartupPluginsSettled` \/ `runLateSessionStartHooks` callback reaches the interface once startup plugins have finished loading.\n\n- New `awaitHooksAheadOfTurn` and `runLateSessionStartHooks` methods let these late hooks finish before a request is sent to the model.\n\n- Reloading the hooks module can now report \"was judged\" or fail with \"its judges with it\".\n\n**Why**\n\nPlugins that load late now get their `SessionStart` hooks run. The output of those hooks may reach the model at a different point than before.\n\n- Area: Hooks\n- Names: `SessionStart`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}