Repository navigation
Description
Summary
Workspace archiving (RUNTIME_FILE_ARCHIVE_*) is effectively a remote-backend-only feature, but nothing says so. The only real implementation of archive_conversation_workspace lives on RemoteSandboxService (the runtime-api backend); every other backend — including DockerSandboxService, which Docker Compose uses — inherits the default no-op. Setting RUNTIME_FILE_ARCHIVE_ENABLED=true on any non-remote install therefore captures zero artifacts on any code path, with no error or log line. Users get Laminar traces but no workspace artifacts, and the docs (https://docs.openhands.dev/enterprise/environment-variables) do not restrict the feature to a particular sandbox backend.
There are two distinct code paths where a workspace should be captured and currently isn't, tracked as sub-issues:
1. Explicit conversation delete → #1458
The conversation-delete finalizer (app_conversation_router.py:1135) calls archive_conversation_workspace on every conversation delete, then tears the sandbox down. Under Docker Compose the call inherits the no-op and succeeds vacuously — the sandbox is torn down with no capture. This is the sole app-server capture path (per the real implementation's docstring) and the small, mechanical fix: implement archive_conversation_workspace on DockerSandboxService, whose building blocks (container lookup, session_api_key from container env, agent-server URL resolution) already exist.
2. Idle/expiry reap via the lifecycle worker → #1457
The lifecycle worker (sandbox/lifecycle/tasks.py) pauses/deletes sandboxes on idle / max-session / inactivity rules — the dominant deletion mode — with no archive step, for any backend. Under Helm, only runtime-api's cleanup cron covers idle capture, and only for the remote backend. This is the larger, cross-backend fix with real design questions (per-conversation keying for grouped sandboxes, where workspace_path comes from at reap time, avoiding double-capture under Helm-remote).
Why this matters
The workspace-artifact pipeline (final archives with enriched manifests: repo_remote/branch/head_commit, pip/npm deps, runtime versions — PRs #14953 / #15058 / #15059) is currently available only on the remote/K8s backend via runtime-api. Both sub-issues are needed to make RUNTIME_FILE_ARCHIVE_* behave as documented on non-remote installs.
Environment
- Install: any non-remote backend (Docker Compose, self-hosted Docker, E2B, K8s-agent); also Helm with a non-remote backend
- Relevant files:
openhands/app_server/sandbox/sandbox_service.py,docker_sandbox_service.py,remote_sandbox_service.py,app_conversation/app_conversation_router.py,sandbox/workspace_archive.py,sandbox/lifecycle/tasks.py
Sub-issues
- Docker: conversation-delete workspace archive is a silent no-op (implement archive_conversation_workspace on DockerSandboxService) #1458 — Docker: conversation-delete workspace archive is a silent no-op (explicit-delete path)
- Idle/expiry sandbox reap (lifecycle worker) skips workspace archiving on all non-remote backends #1457 — Idle/expiry sandbox reap (lifecycle worker) skips workspace archiving on all non-remote backends
This issue was created by an AI agent (OpenHands) on behalf of Juan Michelini.
Activity
[-]Workspace archiving is a silent no-op under Docker Compose (DockerSandboxService doesn't implement archive_conversation_workspace)[/-][+]Workspace archiving (RUNTIME_FILE_ARCHIVE_*) is remote-backend-only: no capture on any non-remote backend[/+]