[FEATURE REQUEST] hook on session init

Status Fixed / completed
Maintainer reply ✓ Yes — dicksontsai
Activity 9 comments · opened Jul 21, 2025 · closed Jul 29, 2025
💡 Likely answer: A maintainer (dicksontsai, collaborator) responded on this thread — see the highlighted reply below.

I would like to start all my Claude Code sessions with a List(.)

I believe adding a hook for session init can be useful for this and other usecases.

Should run on /clear too

/compact should probably have his own hook too.

View original on GitHub ↗

9 Comments

Git-on-my-level · 1 year ago

Adding another use-case here, I would love to be able to inject specific context into Claude Code depending on project state or remote state. For example if there are open tickets, if the user is using a meta-framework for Claude Code, etc...

adriangalilea · 1 year ago
Adding another use-case here, I would love to be able to inject specific context into Claude Code depending on project state or remote state. For example if there are open tickets, if the user is using a meta-framework for Claude Code, etc...

Exactly why I created the issue, project CLAUDE.md is great for static data, but sometimes you need dynamic data on runtime.

cosgroveb · 1 year ago

I would like to start my session with a hook executing that allows me to to select memories to pull into context based on the task at hand. A command would be fine but this would be more consistent than me remembering to run a command.

dicksontsai collaborator · 1 year ago

The SessionStart hook is now available in v1.0.62!

cosgroveb · 1 year ago

Oh heck yes. I just blogged today about how I wanted to use this https://writeaheadblogg.ing/posts/claude-hooks-stop-burning-tokens-on-irrelevant-mem/

cosgroveb · 1 year ago

I, too, would find a compact hook potentially useful

cosgroveb · 1 year ago
dicksontsai collaborator · 1 year ago
github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.