[FEATURE] API endpoints for active session data

Resolved 💬 2 comments Opened Mar 10, 2026 by Wlanium Closed Apr 8, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

As a power user running Claude Code across dozens of machines (workstations, home lab VMs, web servers) via SSH, I lose track of where I have active sessions. I don't even remember all the machines I've used. The session data already exists on Anthropic's backend – but there's no programmatic way to access it.

Proposed Solution

API endpoints to query and manage my own session data: - GET /v1/sessions – list all active sessions tied to my account (hostname, IP, model, project directory, duration, last activity, context usage) - GET /v1/sessions/{id} – detailed info for a specific session - DELETE /v1/sessions/{id} – terminate a specific session - DELETE /v1/sessions?stale=true – terminate only inactive sessions Authenticated via existing API key or OAuth. Important: This is not a request for Anthropic to build a dashboard or UI. The API provides the data – users build their own monitoring tools, dashboards, or integrations on top of it. This keeps it flexible and useful for different workflows.

Alternative Solutions

  • Self-hosted dashboard to see all active sessions at a glance without SSH-ing into machines you forgot about - Security monitoring – detect unauthorized use of your API key - Cost control – find and kill stale Opus sessions burning quota
  • Integration into existing monitoring setups (Grafana, home lab dashboards)

Priority

Low - Nice to have

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

## Who benefits

DevOps engineers, sysadmins, homelab enthusiasts, anyone running Claude Code across multiple environments professionally.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗