Shell environment variables
Every terminal Saggar starts is a normal login shell with these additional values:
| Variable | Value |
|---|---|
SAGGAR | 1 |
TERM_PROGRAM | saggar |
SAGGAR_SESSION | A unique identifier for the terminal session |
CLAUDE_CODE_ENABLE_TODO_TOOLS | 1, so Claude Code reports plan progress Saggar can show |
CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS | 5000, so Claude Code's session-end hooks have time to record the turn |
Prompts and tools can use SAGGAR=1 or TERM_PROGRAM=saggar to detect the app.
Provider hooks and the saggar CLI use SAGGAR_SESSION to address the calling
terminal without guessing.