codex-session-start-context
Report lightweight Codex session and repository context.
hook
SessionStart
codex
mode: context
config/hook-registry.json (entry) hooks/wagents-hook.py (relevant policy + dispatcher)
Report lightweight Codex session and repository context.
Registry Entry
Section titled “Registry Entry”| Field | Value |
|---|---|
| id | codex-session-start-context |
| status_message | Gathering Codex session context |
| mode | context |
| logical_event | SessionStart |
| matcher | startup|resume|clear |
| command | python3 {repo_root}/hooks/wagents-hook.py codex-session-start-context --harness {harness} |
| timeout | 5 |
| harnesses | ["codex"] |
Full hook config + command reference
{ "id": "codex-session-start-context", "description": "Report lightweight Codex session and repository context.", "status_message": "Gathering Codex session context", "mode": "context", "logical_event": "SessionStart", "matcher": "startup|resume|clear", "command": "python3 {repo_root}/hooks/wagents-hook.py codex-session-start-context --harness {harness}", "timeout": 5, "harnesses": [ "codex" ]}# ... (full file at repo root; key entrypoints below)def _policy_codex_session_start_context(payload: NormalizedPayload) -> int: message = ( f"Codex session context: {_git_session_context(payload.cwd)}; managed hooks source=config/hook-registry.json." ) return _additional_context(payload, message, policy_id="codex-session-start-context")
# main dispatchPOLICIES = { "codex-session-start-context": _policy_codex_session_start_context, ...}if __name__ == "__main__": raise SystemExit(main())Command executed (after template expansion for Codex harness):
python3 /path/to/repo/hooks/wagents-hook.py codex-session-start-context --harness codex
See full wagents-hook.py and _git_session_context for implementation.
Resources
Section titled “Resources” Hooks Hub All repo-managed lifecycle hooks.
wagents hooks Inspect and validate hooks via CLI.