How Hooks Work

Deep integration with Claude Code lifecycle - intercept events and coordinate agents automatically

Claude Code
AI assistant lifecycle
Lifecycle Events
8 hook triggers
ULPI Hooks
Intercept & coordinate
MCP Bridge
Local client proxy
Cloud API
Coordination + Memory
8
8 Hooks
47
MCP Tools
~200ms
Latency
0
Conflicts

Zero Merge Conflicts

Automatic file reservations prevent agents from overwriting each other's changes

Without Hooks

Manual coordination

Merge Conflicts per Week
12-20
Multiple agents, same files
Context Loss
~40%
After compaction events
Agents overwrite each other's changes
Lost context after memory compaction
No cross-agent communication
Manual file locking required

With ULPI Hooks

Automatic coordination

Merge Conflicts per Week
0
Auto file reservations
Context Preserved
100%
Pre-compact snapshots
Automatic file reservations prevent conflicts
Memory snapshots before compaction
Agent-to-agent messaging built-in
Zero configuration required
0 Conflicts

Session Management

Automatic agent registration on startup. Display coordination dashboard and file reservations. Initialize memory context.

File Conflict Prevention

Pre-edit hook checks file reservations. Blocks edits if another agent has claimed the file. Zero merge conflicts, guaranteed.

Memory Preservation

Pre-compact hook creates snapshots before Claude compresses context. Never lose important learnings or decisions.

Agent Messaging Integration

User-prompt hook alerts Claude to urgent messages. See critical coordination info before responding to user.

Obligation Tracking

Post-edit hook shows pending tasks after file modifications. Track what needs review or acknowledgment.

Safe Shutdown

Stop hook blocks termination if critical acks pending. Session-end hook releases all file reservations cleanly.

8 Lifecycle Hooks

Click each hook to see trigger events, exit codes, and MCP tools used

session-start

Register agent identity, display coordination dashboard

Exit Codes
0: Allow session
2: Block session
MCP Tools Used
register-agent
fetch-inbox
list-file-reservations

Real-World Use Cases

See how hooks enable seamless multi-agent coordination

Multi-Agent Collaboration

3 developers (Alice, Bob, Charlie) work on the same repo simultaneously. File reservations prevent conflicts. Messages coordinate dependencies.

Alice edits auth.ts, Bob tries to edit → blocked by pre-tool-use hook → Bob messages Alice instead

Task Agent Coordination

Main agent spawns 5 subagents for parallel workflows. Each claims unique files. Subagent-stop hook stores learnings to shared memory.

Main agent delegates tasks → Subagents claim files → Work completes → Learnings consolidated

Memory Snapshot Creation

Pre-compact hook fires before Claude compresses context. Critical decisions and architecture choices preserved automatically.

Context approaching limit → Pre-compact hook → Snapshot stored → Compaction proceeds safely

Urgent Message Alerts

Team member sends high-priority message. User-prompt-submit hook alerts Claude before next response. Critical info never missed.

Security issue found → Urgent message sent → Claude sees alert → Addresses immediately

File Reservation Automation

Pre-edit hook auto-claims files on first edit. Shared mode for read-heavy files. Exclusive mode for critical edits. Zero config required.

Claude edits file → Hook reserves it → Other agents see lock → Coordinate through messages

Safe Multi-Agent Shutdown

Stop hook ensures all acknowledgments complete. Session-end releases file locks. Clean handoff to next session.

User hits stop → Pending acks? → Blocked → Complete acks → Graceful shutdown

Automatic Setup

One package, one command - guided setup installs hooks for all your IDEs automatically

Step 1

Install ULPI Package

One package contains CLI, MCP bridge, and hooks - everything you need

# Install globally (recommended)
npm install -g ulpi

# Or locally in your project
npm install ulpi
Step 2

Run Guided Setup

Interactive setup configures hooks automatically for all supported IDEs

# Run the setup wizard
ulpi setup

# Follow the prompts:
# 1. Enter your API token
# 2. Select your IDE(s)
# 3. Hooks are installed automatically
#
# That's it! Setup handles everything.
Step 3

Restart Your IDE

Hooks activate automatically - zero manual configuration needed

# Restart your IDE (Claude Code, Cursor, Windsurf, etc.)
# Hooks will start intercepting lifecycle events
# Check terminal for hook execution logs
#
# All 8 hooks are now active and coordinating your agents!
That's It - Hooks Installed!

The guided setup configured everything automatically. All 8 hooks are now active across your IDEs.

Compatible AI Assistants

Works with any AI coding assistant that supports lifecycle hooks

AI Assistant Agnostic

Works with any AI coding assistant that supports lifecycle hooks

Claude Code
Full Support
8 hooks
Cursor
Full Support
8 hooks
Windsurf
Full Support
8 hooks
Cline
Partial Support
6 hooks
A
Aider
Coming Soon
Continue
Coming Soon
3 Fully Supported
Claude Code, Cursor, Windsurf

Performance Metrics

Optimized for speed - minimal latency on every hook execution

Optimized for Speed
Hook
Avg Latency
MCP Calls
Blocking
Optimization
session-start
~200ms
3
No
Initial registration
user-prompt-submit
~50ms
1
No
Inbox check only
pre-tool-use:edit
~150ms
2
Yes
File reservation check
post-tool-use:edit
~100ms
1
No
Async obligations
stop
~75ms
1
Yes
Critical acks only
subagent-stop
~180ms
2
No
Memory consolidation
session-end
~120ms
2
No
Release reservations
pre-compact
~250ms
2
No
Context snapshot
Average Latency
~140ms
Per hook execution
Total MCP Calls
14
Across all hooks
Blocking Hooks
2/8
Can prevent actions

Ready to Coordinate Your AI Assistants?

Hooks are FREE with Coordination + Memory subscriptions. Zero merge conflicts guaranteed.