{ "hooks": { "SessionStart": [ { "hooks": [ { "type": "command", "command": "curl -s -X POST http://localhost:8045/api/event -H 'Content-Type: application/json' -d '{\"code\":\"init\",\"source\":\"codex\"}' &", "timeout": 5 } ] } ], "PreToolUse": [ { "matcher": "Bash|apply_patch", "hooks": [ { "type": "command", "command": "curl -s -X POST http://localhost:8045/api/event -H 'Content-Type: application/json' -d '{\"code\":\"using_tool\",\"source\":\"codex\"}' &", "timeout": 5 } ] } ], "PostToolUse": [ { "matcher": "Bash|apply_patch", "hooks": [ { "type": "command", "command": "curl -s -X POST http://localhost:8045/api/event -H 'Content-Type: application/json' -d '{\"code\":\"tool_done\",\"source\":\"codex\"}' &", "timeout": 5 } ] } ], "Stop": [ { "hooks": [ { "type": "command", "command": "curl -s -X POST http://localhost:8045/api/event -H 'Content-Type: application/json' -d '{\"code\":\"idle\",\"source\":\"codex\"}' &", "timeout": 5 } ] } ] } }