[Feature Request] Session Start Hook

Resolved 💬 3 comments Opened Jul 11, 2025 by jason-riddle Closed Jul 11, 2025

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

  1. Memory Injection: Load user memories or context from external files
  2. Dynamic Context Loading: Pull fresh context from APIs or databases
  3. Project Setup: Initialize project-specific configurations or environment variables

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗