noodlbox

Session Hooks

Automatic architecture context at conversation start

Session hooks inject Noodlbox context at the start of a conversation, before any reasoning begins. Your AI agent knows about the codebase structure from the first message.

How It Works

When you start a new conversation in an indexed repository:

  1. The hook detects the repository is indexed
  2. Injects context about available tools and resources
  3. Your agent immediately knows how to explore the codebase

The hook only fires on fresh sessions, not when resuming or clearing.

What Gets Injected

When the hook detects an indexed repository, your agent receives:

  • Available tools - semantic search, impact detection, graph queries
  • Available resources - architecture map, database schema
  • Knowledge graph schema - node types, relationships, and properties
  • Usage tips - read the map first to understand structure

Knowledge Graph Schema

The hook calls noodl schema and injects the full database schema, wrapped in <noodlbox-schema> tags. This gives your agent immediate understanding of:

  • Node types - CODE_SYMBOL, FILE, COMMUNITY, PROCESS
  • Relationships - CALLS, CONTAINED_BY, MEMBER_OF, STEP_IN_PROCESS
  • Properties - Available fields on each node type

With this schema, your agent can write accurate Cypher queries without needing to discover the structure first.

Setup

Session hooks are automatically configured when you install the Noodlbox plugin:

claude plugin install noodlbox@noodlbox

Uses the SessionStart hook to inject context when a conversation begins.

When It Fires

EventHook Fires?Why
New conversationYesFresh session needs context
ResumeNoContext already in conversation
ClearNoUser intentionally clearing

See Also

On this page