Skip to content

Lifecycle Hooks

TokenPilot implements host-specific lifecycle hooks through its adapters. The actual hooks available depend on the host:

HostHooks Used
Codex CLISessionStart, PreToolUse, PostToolUse (registered in hooks.json)
Claude CodeSessionStart (auto-starts gateway)

These are host-specific hook names used by TokenPilot adapters, not a universal lifecycle specification. No formal lifecycle hook specification exists for the platform.

The shared runtime logic lives in components/packages/foundation/runtime-core/, while the hook wiring lives in components/adapters/<host>/src/.

Released under the MIT License.