session-start
Report basic session environment and repository state.
hook
SessionStart
github-copilot
config/hook-registry.json (entry) hooks/session-start.sh
Report basic session environment and repository state.
Registry Entry
Section titled “Registry Entry”| Field | Value |
|---|---|
| id | session-start |
| logical_event | SessionStart |
| matcher | startup|resume|clear |
| command | ./hooks/session-start.sh |
| timeout | 15 |
| harnesses | ["github-copilot"] |
Command Reference
Section titled “Command Reference”The handler is a simple shell script that reports branch, dirty state, and basic env warnings.
Full hook config + command reference
{ "id": "session-start", "description": "Report basic session environment and repository state.", "logical_event": "SessionStart", "matcher": "startup|resume|clear", "command": "./hooks/session-start.sh", "timeout": 15, "harnesses": [ "github-copilot" ]}#!/bin/bashERRORS=""for tool in jq git uv node; do command -v "$tool" &>/dev/null || ERRORS="${ERRORS}WARNING: '${tool}' not found"$'\n'done
if [ -n "$CLAUDE_ENV_FILE" ]; then echo 'export PYTHONDONTWRITEBYTECODE=1' >> "$CLAUDE_ENV_FILE"fi
if command -v git &>/dev/null && git rev-parse --git-dir &>/dev/null 2>&1; then BRANCH=$(git branch --show-current 2>/dev/null) echo "Branch: ${BRANCH}" DIRTY=$(git status --porcelain 2>/dev/null | wc -l | tr -d ' ') [ "$DIRTY" -gt 0 ] && echo "Uncommitted changes: ${DIRTY} files"fi
[ -n "$ERRORS" ] && printf "%s" "$ERRORS"echo "Success"exit 0Resources
Section titled “Resources” Hooks Hub All repo-managed lifecycle hooks.
wagents hooks Inspect and validate hooks via CLI.