[FEATURE] Add terminal_title to hook JSON payload for session identification
Resolved 💬 3 comments Opened Jan 18, 2026 by ballgit Closed Jan 22, 2026
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Problem Statement
When running multiple Claude Code sessions, notification hooks cannot identify
which terminal/session triggered the notification. Claude Code sets the terminal
tab title (e.g., "Codebase Understanding"), but this information is not included
in hook payloads.
Current hook payload:
{
"session_id": "abc123",
"cwd": "C:\\Projects\\my-project",
"transcript_path": "...",
"hook_event_name": "Notification",
"notification_type": "permission_prompt",
"message": "Claude needs your permission to use Bash"
}
Proposed Solution
Requested addition:
{
"session_id": "abc123",
"cwd": "C:\\Projects\\my-project",
"terminal_title": "Codebase Understanding", // <-- ADD THIS
"transcript_path": "...",
"hook_event_name": "Notification",
"notification_type": "permission_prompt",
"message": "Claude needs your permission to use Bash"
}
Use Case
Custom notification scripts need to show which Claude Code session needs attention.
The folder name (from cwd) is often not descriptive enough when working on
multiple tasks in the same project.
Since Claude Code already sets the terminal title internally, this should be
straightforward to include in the hook payload.
Related Issues
- #2112 - Custom session names (related but different)
- #7881 - Subagent identification (similar problem)
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗