SessionStart hook: add sessionColor output key
Feature Request
Problem: There's no way to automatically set the session/prompt color based on the working directory via hooks. The SessionStart hook only supports hookSpecificOutput.additionalContext, which adds text to the assistant's context but can't trigger UI changes.
Use case: I work across multiple checkouts of the same repo and want different prompt colors per directory to visually distinguish sessions. Currently I have a SessionStart hook that detects the directory and outputs a reminder to set the color, but I still have to manually run /color blue each time.
Proposed solution: Add a sessionColor key to SessionStart's hookSpecificOutput:
{
"hookSpecificOutput": {
"sessionColor": "blue"
}
}
This would allow hooks like:
case "$PWD" in
/my-project*) echo '{"hookSpecificOutput":{"sessionColor":"blue"}}' ;;
esac
Alternatives considered:
- Using
additionalContextto remind the assistant — the assistant can't execute/colorcommands - Manual
/coloreach session — defeats the purpose of hooks
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗