[Feature Request] Session Start Hook
Feature Request
Add a hook for executing commands at the beginning of Claude Code sessions. (i.e. SessionStart)
Problem Statement
Currently, there's no hook that executes at the very beginning of a Claude Code session. Users who want to inject context must either use /slash commands manually (which works fine, but it's a manual process so it's easy to forget to run) or rely on using CLAUDE.md files, which can cause context dilution when CLAUDE.md files get too long or important information is buried in the middle of the file and claude misses it.
Also, I don't want to put this in my global CLAUDE.md as it's project specific, but I also don't want to have to keep copying this logic/section from old projects to new projects within the project's CLAUDE.md file.
Proposed Solution
Add a new SessionStart hook that executes immediately when a Claude Code session begins, before any user interaction or tool execution.
Use Cases
- Memory Injection: Load user memories or context from external files
- Dynamic Context Loading: Pull fresh context from APIs or databases
- Project Setup: Initialize project-specific configurations or environment variables
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗