pdd sessions manages the remote PDD sessions associated with your PDD Cloud account. Remote sessions are created automatically when you run pdd connect while authenticated, and are deregistered when the server shuts down gracefully. Use pdd sessions to inspect active sessions and manually remove any orphaned ones.
Usage
Subcommands
sessions list
List all active remote sessions associated with your authenticated account.Output sessions as JSON instead of a formatted table. Useful for scripting.
| Column | Description |
|---|---|
| SESSION ID | Truncated unique identifier for the session |
| PROJECT | Project name associated with the session |
| CLOUD URL | Remote access URL via PDD Cloud |
| STATUS | Session status: active or stale |
| LAST SEEN | Timestamp of the last heartbeat |
sessions info
Display detailed information about a specific session.The unique identifier of the session to inspect. Use
pdd sessions list to find session IDs.sessions cleanup
Deregister one or more remote sessions.Remove only stale sessions (those with no recent heartbeat).
Remove all sessions for the current user, including active ones.
Skip the confirmation prompt before removing sessions.
--stale nor --all is specified, the command runs in interactive mode: it displays the session list and prompts you to enter session numbers, stale, or all.
Session lifecycle
Sessions are managed automatically:- Created —
pdd connectregisters a session with PDD Cloud when authenticated (unless--local-onlyis passed). - Heartbeat — The running server sends periodic heartbeats to keep the session marked as
active. - Deregistered — The session is removed when
pdd connectis stopped gracefully withCtrl+C.
If a
pdd connect instance is terminated ungracefully (e.g., killed or a crash), the session remains in a stale state in PDD Cloud. Use pdd sessions cleanup --stale to remove these orphaned sessions.Authentication requirement
Allpdd sessions subcommands require an active PDD Cloud login. Run pdd auth login first if you are not authenticated.
Examples
Related commands
pdd connect— Creates and manages sessions; use--local-onlyto skip session registration.pdd auth— Authenticate with PDD Cloud before using session management.