-
Notifications
You must be signed in to change notification settings - Fork 843
Open
Description
Copilot CLI supports renaming the active session via /rename <name> (alias of /session rename <name>), but this capability is not exposed in the SDK APIs.
Please add first-class session rename support in copilot-sdk so applications can rename sessions programmatically without invoking CLI commands manually.
Problem
Today, SDK consumers cannot rename the current session after creation. CLI users can, through:
/rename <name>/session rename <name>
Both commands behave the same way.
Why this matters
- Increases feature parity between CLI and SDK experiences
- Supports chat UIs/workbenches that allow conversation renaming
- Avoids brittle workarounds that shell out to CLI command text
- Improves metadata management for long-lived and resumed sessions
Requested capability
Add APIs to name / rename a session. Suggestions:
- add
nametoSessionMetadata session.rename(name)session.getName()returns the name of the sessionclient.renameSession(sessionId, name)client.getSessionName(sessionId)returns the name of the sessionclient.listSessions()should include names, if set, in theSessionMetadataobjects / data structures
Expected behavior
- Renames the target/current session
- Follows the same validation rules as CLI rename commands
- Returns success and/or updated session metadata
- Works consistently for active and resumed sessions
Acceptance criteria
- Session rename is available through the official SDK API surface
- Behavior matches CLI (
/renameand/session rename) - Documented in SDK docs with examples
- Covered by tests (including invalid names and resumed sessions)
Reactions are currently unavailable