Skip to content

Latest commit

 

History

History
52 lines (39 loc) · 1.9 KB

hooks.md

File metadata and controls

52 lines (39 loc) · 1.9 KB

Hook Reference

Plugin Hooks execute commands inside the host session. Inspect the installed definition in /hooks before trusting it and stop if it differs from the checked-in source.

The canonical sources are hooks/codex-hooks.json and the packaged hooks/codex-session-start.cmd wrapper. This page is a human-readable rendering. The publication validator compares every command block below with those sources.

Codex SessionStart

The matcher is startup|resume|clear|compact. On Linux and macOS, the exact checked-in command is:

printf '%s\n\n' 'You have Axiom. Load this startup front door before deciding whether any Axiom skill applies:'; cat "${PLUGIN_ROOT}/skills/using-axiom/SKILL.md"

On Windows, the exact checked-in command invokes the packaged wrapper:

"%PLUGIN_ROOT%\hooks\codex-session-start.cmd"

The wrapper contains only command-shell built-ins:

@echo off
setlocal DisableDelayedExpansion
echo You have Axiom. Load this startup front door before deciding whether any Axiom skill applies:
echo(
type "%~dp0..\skills\using-axiom\SKILL.md"

The handler has a five-second timeout. The Windows path is plugin-relative and does not resolve a program from the session working directory or PATH.

Bounded Behavior

The checked-in handlers print a loading message and read skills/using-axiom/SKILL.md from the installed plugin root. They do not write files, access credentials, start background work, or contact a network service. The Hook loads the routing gate; the gate decides whether a route matches. It does not authorize an action.

If the installed matcher, command, root variable, wrapper, timeout, or event differs, stop trusting that Hook until the installation and checked-in package are reconciled through the host-managed lifecycle in Managing an Installation.