SessionStart hook: add sessionColor output key

Resolved 💬 3 comments Opened Mar 26, 2026 by CharlesWintersTW Closed Mar 26, 2026

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 additionalContext to remind the assistant — the assistant can't execute /color commands
  • Manual /color each session — defeats the purpose of hooks

🤖 Generated with Claude Code

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗