Trigger repo automation when a session begins.
Section: Hooks basics
Run a session-start hook script
json
json
{
"type": "command",
"bash": "./scripts/session-start.sh",
"powershell": "./scripts/session-start.ps1",
"cwd": "scripts",
"timeoutSec": 30
}Explanation
Session start hooks can log, bootstrap, or validate repo state before the agent proceeds.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Hooks basics
Add an MCP server for one session from a file
Load additional MCP server config at runtime.
Disable all built-in MCP servers
Run without the default built-in servers.