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, Stop (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 packages/runtime-core/, while the hook wiring lives in adapters/<host>/src/integration/.

Released under the MIT License.