github / github/copilot-cli

Add sessionTitle field to hook output (like additionalContext) for programmatic session renaming

Open
#4,599 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.