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