You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(sessions): long-lived session pods with manual lifecycle
Adds two new routes:
* POST /v1/sessions creates a long-lived executor pod/container,
optionally pre-staging files from /v1/files.
* DELETE /v1/sessions/{id} tears the session down.
Both Docker and Kubernetes backends are supported. Sessions are labeled
``app=code-interpreter,component=session`` so they can be enumerated for
debugging, and named ``code-session-<uuid>`` so the delete path can
sanity-check that callers aren't accidentally targeting other resources.
Known limitation: this PR has no automatic cleanup. A session that the
caller forgets to DELETE will live for the configured idle window
(``SESSION_MAX_LIFETIME_SECONDS`` = 24h). The follow-up PR adds per-session
TTL enforcement plus a reaper for crash recovery.
Tests cover both backends and the route layer (success, 404 mapping,
501 mapping, file resolution, prefix-based safety check on delete).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments