Feature Request: Conversation Start Hook
Summary
Add a new hook type that fires when a Claude Code conversation begins, similar to existing PreToolUse/PostToolUse hooks.
Problem
Currently, Claude Code only provides hooks for tool usage events:
PreToolUse- Before tool executionPostToolUse- After tool completionNotification- For system notificationsStop- When Claude wants to stop
There's no hook for conversation initialization, which prevents automatic context loading at conversation start.
Use Case: Memory System Integration
Modern AI assistants benefit from persistent memory across conversations. With MCP servers like orion-memory providing mem0 integration, conversations should automatically load relevant context from previous sessions.
Currently, memory retrieval is manual - the assistant must remember to search for relevant memories. A conversation start hook would enable automatic memory loading based on:
- Recent conversation topics
- Project context from working directory
- User preferences and patterns
- Relevant technical context
This creates a seamless experience where each conversation begins with appropriate historical context already loaded.
Proposed Solution
Add a new hook type: ConversationStart that fires when:
- A new conversation begins
- An existing conversation is resumed via
--resume
Suggested Implementation
# Hook configuration example
{
"PreConversationStart": {
"command": "/path/to/memory-loader.sh",
"args": ["${conversation_id}", "${working_directory}"]
}
}
This would complete the conversation lifecycle hook coverage: Start → Tool Use → Stop.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗