github / github/copilot-cli

Support `/rename` in VS Code agent sessions, and let the agent invoke it

Aperta
#4,244 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

area:agents area:sessions
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

Problem

/rename (added in #1776) works in the terminal CLI, but not for Copilot CLI sessions hosted in VS Code's Agents window:

  • Typing /rename in 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

  1. Honor /rename NEW_NAME in VS Code agent sessions, matching the terminal CLI behavior.
  2. 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.yaml directly doesn't work as a workaround: VS Code caches session labels elsewhere (workspace state.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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia tracciando l’implementazione esistente di /rename nel terminale a partire da #1776, quindi esamina workspace.yaml e il comportamento di state.vscdb/agentSessions.model.cache di VS Code descritto qui. Il lavoro è completato quando /rename NEW_NAME funziona nella chat dell’agente di VS Code e un agente dispone di un modo supportato per rinominare la propria sessione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
shell, vscode
Ambito
cli, developer-experience
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.