Support `/rename` in VS Code agent sessions, and let the agent invoke it
Personne n'a encore pris cette issue.
- Langage dominant
- Shell
- Étoiles
- 11.2k
- Forks
- 1.9k
- Merge moyen
- 14 h 16 min
- PR mergées (30 j)
- 6
Description
Problem
/rename (added in #1776) works in the terminal CLI, but not for Copilot CLI sessions hosted in VS Code's Agents window:
- Typing
/renamein an agent session's chat has no effect there — renaming is only available through the VS Code UI (verified 2026-07-23). - There is no way for the agent itself to rename its session — no tool, and no slash-command it can run.
Proposal
- Honor
/rename NEW_NAMEin VS Code agent sessions, matching the terminal CLI behavior. - Expose rename to the agent (a tool, or agent-invocable
/rename), so workflows can set titles programmatically.
Use case
Session-hygiene rituals: I keep many long-running agent sessions and prefix titles with a status word as threads settle — DONE …, PARKED …, CONT'D … — so the session picker doubles as a work board. Today every close-out ends with manual rename homework; an agent-invocable rename would let the close-out workflow set the title itself (and lower-stakes: agents could title sessions descriptively from the start, cf. #3365 on auto-naming).
Notes from poking at the internals
- A UI rename syncs into
~/.copilot/session-state/UUID/workspace.yaml(name:+user_named:), so agents can already read current titles (verified 2026-07-24). - Writing
workspace.yamldirectly doesn't work as a workaround: VS Code caches session labels elsewhere (workspacestate.vscdb,agentSessions.model.cache) and doesn't notice the change.
Related
- #1776 — added
/rename(terminal CLI) - #3365 — auto-generated session names not working
- #3415 — show session name at all times
- #2966 — broader session-management tooling
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par suivre l’implémentation existante de /rename dans le terminal depuis #1776, puis examinez workspace.yaml et le comportement de state.vscdb/agentSessions.model.cache de VS Code décrit ici. C’est terminé lorsque /rename NEW_NAME fonctionne dans le chat d’agent de VS Code et qu’un agent dispose d’un moyen pris en charge pour renommer sa session.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- shell, vscode
- Domaine
- cli, developer-experience
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100