Status Change Hooks Guide

March 21, 2026 ยท View on GitHub

Configuration Examples

Notifications

Below, I'll provide an example using the noti command. You don't necessarily have to use noti. Please customize it as needed.

Configure CCManager to send notifications for each status:

  1. Run ccmanager
  2. Navigate to Global Configuration โ†’ Configure Status Hooks
  3. Set up the following hooks:

Idle Hook:

noti -t "Claude Code" -m "Session is now idle in $CCMANAGER_WORKTREE_BRANCH"

Busy Hook:

noti -t "Claude Code" -m "Session is now busy on branch $CCMANAGER_WORKTREE_BRANCH"

Waiting for Input Hook:

noti -t "Claude Code" -m "Claude is waiting for your input in $CCMANAGER_WORKTREE_BRANCH branch"

Integration with Other Tools

Send to Slack (using webhook):

curl -X POST -H 'Content-type: application/json' --data '{"text":"Claude is now '"$CCMANAGER_NEW_STATE"' in '"$CCMANAGER_WORKTREE_PATH"'"}' YOUR_SLACK_WEBHOOK_URL

Update tmux status:

tmux set -g status-right "Claude: $CCMANAGER_NEW_STATE" && noti -t "Claude Status" -m "$CCMANAGER_NEW_STATE"

Troubleshooting

  • Ensure commands is in your PATH
  • Test commands in terminal first before adding to CCManager
  • Remember that hooks run in the worktree directory context

Environment Variables Reference

  • CCMANAGER_OLD_STATE: Previous state (idle, busy, waiting_input)
  • CCMANAGER_NEW_STATE: New state (idle, busy, waiting_input)
  • CCMANAGER_WORKTREE_PATH: Path to the worktree where status changed
  • CCMANAGER_WORKTREE_DIR: Directory name of the worktree (basename only)
  • CCMANAGER_WORKTREE_BRANCH: Git branch name of the worktree
  • CCMANAGER_SESSION_ID: Unique session identifier