Manage agent sessions
List and revoke active local and remote Agent Proxy sessions
Use stashbase agent sessions to see active runs and revoke one when its access should end early.
List sessions
By default, the command combines local sessions running on this machine with remote sessions owned by the authenticated account:
stashbase agent sessions listLimit the result when you need one scope only:
stashbase agent sessions list --local
stashbase agent sessions list --remote--local does not require authentication. The combined and --remote views require an authenticated CLI. Local session records are stored in the Stashbase configuration directory with owner-only permissions; stale records are removed when listed.
The table identifies each session by its origin, ID, and start time. Use --json for a JSON array.
Revoke a session
Copy the session ID from the list and revoke it:
stashbase agent sessions revoke ags_1234567890123456789012The command checks the local machine first, then revokes a matching remote session. To target one scope explicitly, use one of these mutually exclusive options:
stashbase agent sessions revoke ags_1234567890123456789012 --local
stashbase agent sessions revoke ags_1234567890123456789012 --remoteRevoking a local session terminates its Stashbase CLI process and closes its local proxy. Revoking a remote session disables every active token for that logical run and marks it ended. An invalid or unknown session ID exits unsuccessfully.
Revocation blocks further Agent Proxy requests; it is not a substitute for terminating unrelated processes that may have started independently of the session.