Allow hooks to set the terminal window title
Resolved 💬 3 comments Opened Mar 10, 2026 by ajsutton Closed Mar 10, 2026
Problem
There's no way for hooks (or Claude Code itself) to set the terminal window title. This would be useful for showing a stable, human-readable summary of what the current session is about — e.g. Claude: Terminal title hook for claude-docker.
Why hooks can't do this today
Hooks run in sandboxed subprocesses without access to /dev/tty. The standard approach of writing \033]0;title\007 to the terminal doesn't work because:
- stdout goes to Claude's context
- stderr gets logged
/dev/ttyisn't available
A sidecar process watching a file is possible but overly complex for what should be simple.
Proposal
Either:
- A hook output field like
"terminalTitle": "some string"that Claude Code applies to the terminal, or - A built-in feature where Claude Code automatically sets the terminal title to a short summary of the current task (ideally AI-generated, not just the raw prompt text)
Option 2 seems like the better UX — Claude already knows what it's working on and could produce a clean one-liner summary without any user configuration.
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗