Allow custom instructions for automatically generated chat session titles
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
## Feature request
Allow users to provide user-level or workspace-level instructions for automatically generated chat session titles. The title generator should preserve identifiers derived from the task context, such as repository names, pull request numbers, issue numbers, or work item IDs.
## Motivation
I frequently create or review pull requests in VS Code chat. The generated session title often describes the task but omits the two identifiers needed to find it later: the repository and pull request number. I therefore manually rename each session.
For example, a session working from a pull request URL could follow a user-defined convention such as:
```text
repository-name PR 12345: review
```
General Copilot instructions do not reliably control the separate title-generation request. Agent hooks receive a session ID and transcript path, but their documented output cannot set a session title. Manual Rename and `/rename` work, and Agent Host rename tools now exist, but they still require an explicit action for each session.
## Proposed behavior
Provide a supported way to customize automatic title generation, for example:
- User- and workspace-scoped title-generation instructions.
- A title template with values derived from structured context, such as repository name, PR number, and task type.
- Alternatively, a documented hook output or session API that can set the generated title.
The existing title-generation lifecycle should remain unchanged by default. When customization is configured, both first-turn and summary-based title generation should retain required identifiers. A manually assigned title should continue to take precedence.
## Example
Given a chat request to review a pull request, or a pull request URL attached as context:
```text
Review pull request 12345 in repository-name and post the findings.
```
With a configured convention, the generated title would be:
```text
repository-name PR 12345: review
```
## Acceptance criteria
1. Users can define automatic title-generation instructions at user or workspace scope.
2. The generator can use repository and pull request metadata already present in the prompt or attached context.
3. Required identifiers remain present after first-turn and summary-based title upgrades.
4. Explicitly renamed titles are never overwritten.
5. Users without customization retain the existing title-generation behavior.
## Related issues
- #308186 implemented asynchronous automatic title generation, but its prompt strategy is product-defined.
- #329380 added Agent Host rename tools, but does not define a persistent automatic naming policy.
- #288265 requested programmatic rename and included rule-based naming as a use case, but was closed.
- #313971 requests an LLM title-regeneration action; this request is for automatic user-configured naming.
## Environment
- VS Code: 1.133.0
- GitHub Copilot extension: 0.61.0
- OS: Windows 11
Contributor guide
Assessment
This issue has not been assessed yet.