Skip to content

Hooks

Planned Hook Types

HookTrigger
on_createAfter session creation
on_deleteBefore session deletion
on_startWhen session starts running
on_stopWhen session stops

Planned Environment Variables

VariableDescription
SESSION_NAMEName of the session
SESSION_IDUnique session ID
BACKENDBackend type (zellij, docker, etc.)
AGENTAgent type (claude, codex, gemini)
REPO_PATHPath to the git repository
WORKTREE_PATHPath to the worktree

Workarounds

Wrap clauderon commands in shell scripts:

#!/bin/bash
# Desktop notification on create
clauderon create "$@"
osascript -e "display notification \"Session created\" with title \"clauderon\""
#!/bin/bash
# Archive worktree before deletion
SESSION_NAME="$1"
WORKTREE="$HOME/.clauderon/worktrees/$SESSION_NAME"
[ -d "$WORKTREE" ] && tar -czf "$HOME/archives/$SESSION_NAME.tar.gz" "$WORKTREE"
clauderon delete "$SESSION_NAME"

Debugging Lifecycle Events

Terminal window
RUST_LOG=clauderon=debug clauderon daemon