Context Hooks
Hooks that inject project memory, session reminders, wiki summaries, and mode state into Codex prompts via system-reminder tags.
Context hooks are the OMX hooks that slip structured knowledge into the next prompt. They don't touch what you typed. Instead they emit <system-reminder> tags that Codex reads as injected context, so the model opens every turn already aware of current project memory and whatever directives are active.
Sources injected
Project memory
Key facts and directives written via project_memory_write or project_memory_add_directive. Injected on SessionStart and selectively on subsequent turns when directives are active.
Session reminders
Short-lived notes written via notepad_write_working or notepad_write_priority. Injected until they expire or are pruned.
Wiki summary
When wiki pages exist, a compact excerpt from .omx/wiki/ is surfaced on SessionStart. Write-heavy operations such as ingest and rebuild are deferred to avoid blocking the hook path.
Mode state
When an active workflow mode is detected (ralph, team, ultrawork), its current phase and continuation instructions are included so the model resumes from the right point.
Example
Register a permanent directive to include a trailer in all commits:
omx memory add-directive "All git commits must include Co-authored-by: OmX <omx@oh-my-codex.dev>"The next session start will inject this directive automatically as a <system-reminder> block.
Check what is currently in the notepad:
cat .omx/notepad.md