Surface session working directory / context on `SessionMetadata` so persisted sessions can be resumed by id
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Área
- api, backend-api-design
Línea de trabajo
Comienza con SessionMetadata y los puntos de entrada list_sessions y get_session_metadata; después, compáralos con ResumeSessionConfig, SessionListFilter y SessionRpcMetadata::snapshot. Rastrea dónde se ensamblan los metadatos de las sesiones inactivas y cómo se representan los campos de contexto existentes. Se considera completado cuando ambos métodos de metadatos devuelven campos opcionales y aditivos de directorio de trabajo y contexto, y admiten reanudar una sesión persistida mediante su id.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Client::list_sessions and Client::get_session_metadata return SessionMetadata, which today carries only:
pub struct SessionMetadata {
pub session_id: SessionId,
pub start_time: String,
pub modified_time: String,
pub summary: Option<String>,
pub is_remote: bool,
}
There is no way to recover a persisted session's working directory (or its repository / git-root / branch context) from these calls. This makes it impossible to faithfully resume a session by id after the consuming process has restarted.
Why this is a gap
ResumeSessionConfig asks the caller to supply the working directory:
pub struct ResumeSessionConfig {
pub session_id: SessionId,
pub working_directory: Option<PathBuf>,
// ...
}
A consumer that persists only a session_id (the documented, stable handle for resume) and later wants to resume it has a chicken-and-egg problem: it needs the session's original working directory to resume correctly, but the SDK provides no way to look that up from the id. After a restart, the in-memory mapping from id to working directory is gone, and list_sessions / get_session_metadata don't return it.
The data already appears to exist server-side
Two public-surface signals suggest the working directory / context is already tracked per session and just isn't surfaced on SessionMetadata:
-
SessionListFilteralready lets callers filterlist_sessionsbycwd,git_root,repository, andbranch:pub struct SessionListFilter { pub cwd: Option<String>, pub git_root: Option<String>, pub repository: Option<String>, pub branch: Option<String>, }i.e. the server can match on these fields, but the returned metadata omits them — an asymmetry between what you can filter on and what you get back.
-
The experimental
session.metadata.snapshotRPC (SessionRpcMetadata::snapshot) already returnsworking_directoryplus aworkspacesummary (cwd / git_root / repository / branch / name),selected_model, and more — but only for an active (already-resumed) session, so it can't be used to discover where a dormant session should be resumed.
Proposed change
Surface the session's working directory and context on the dormant-session metadata path, so it can be recovered by id without first resuming:
- Add the working directory (and ideally the
cwd/git_root/repository/branchcontext, and the user-providedname) toSessionMetadata, returned by bothlist_sessionsandget_session_metadata. - All new fields optional / additive, so this is backward compatible for existing consumers.
This lets a consumer that persisted a session_id look up the session's working directory and resume it faithfully across restarts, and render accurate session lists (working directory, title) without having to resume each session first.
Alternatives considered
- Persisting an id-to-working-directory map in the consumer. Works, but duplicates state the runtime already owns and can drift from the on-disk source of truth — hence this request to make the SDK the single source of truth.
- Lenguaje dominante
- TypeScript
- Estrellas
- 10.5k
- Forks
- 1.5k
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 98
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/copilot-sdk
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
github/copilot-sdk#2804 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github/copilot-sdk#2798 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
github/copilot-sdk#2793 ·
Los mantenedores suelen responder en 1 día
-
agentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
github/copilot-sdk#2782 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
github/copilot-sdk#2781 ·
Los mantenedores suelen responder en 1 día
Todos los issues de github/copilot-sdk
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Doist/todoist-cli#576 ·
Los mantenedores suelen responder en 1 día
-
Suggestion: document (or optionally add) a cheaper-model config for find-skills on Claude CodeAbiertofeature
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
vercel-labs/skills#2370 ·
Los mantenedores suelen responder en 1 día
-
🐛 Bug supabase/cli
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CopilotKit/aimock#491 ·
Los mantenedores suelen responder en 1 día