Add sessionTitle field to hook output (like additionalContext) for programmatic session renaming
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
Currently, hook output only supports additionalContext injection (per docs). There's no way for a hook script to set/update the session title programmatically — the only path is a human typing /rename.
Claude Code supports this via hookSpecificOutput.sessionTitle in its SessionStart/UserPromptSubmit hook output — a deterministic script computes a title and the host applies it directly, no model involvement.
Requesting an equivalent sessionTitle field supported in Copilot CLI's sessionStart and/or agentStop hook output, so a script can rename a session based on info only known after the first prompt (e.g., detected worktree/ticket/PR), without requiring the user to copy-paste /rename <title>.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how existing additionalContext output is parsed and applied for sessionStart and agentStop hooks. Check the related hook-output tests and documentation if present; done means a hook can provide sessionTitle and the CLI applies it to the session without requiring /rename.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100