This method is not currently implemented in the SDK. Session tracking is planned for a future release.
Planned Method Signature
async listSessions(): Promise<SessionInfo[]>
Planned Returns
Array of session information objectsShow SessionInfo properties
Unique session identifier
Session name (if provided)
When the session was created
Current working directory
Number of active processes in the session
Workaround
Currently, track sessions manually in your application:
const activeSessions = new Map<string, ExecutionSession>();
// Create and track
const session = await sandbox.createSession({ id: 'my-session' });
activeSessions.set(session.id, session);
// Cleanup
await sandbox.deleteSession('my-session');
activeSessions.delete('my-session');
See Also