Repository navigation
Description
Summary
On the conversation-delete path under Docker Compose, workspace archiving (RUNTIME_FILE_ARCHIVE_*) silently does nothing. The only real implementation of archive_conversation_workspace lives on RemoteSandboxService (the runtime-api backend); every other backend — including DockerSandboxService, which Compose uses — inherits the default no-op. So when a user deletes a conversation with RUNTIME_FILE_ARCHIVE_ENABLED=true, the finalizer's archive call succeeds vacuously and the sandbox is torn down with zero capture, no error, no log line.
Current behavior
SandboxService.archive_conversation_workspace (openhands/app_server/sandbox/sandbox_service.py:413) is a default no-op returning True:
async def archive_conversation_workspace(self, ...) -> bool:
"""Default no-op (returns True) for backends that do not archive;
overridden by RemoteSandboxService."""
return TrueThe conversation-delete finalizer (app_conversation_router.py:1135) calls it on every conversation delete, so under Compose the call succeeds vacuously and the sandbox is torn down with no capture.
Expected behavior
Under Compose with RUNTIME_FILE_ARCHIVE_ENABLED=true, deleting a conversation should capture its workspace to the configured store (docs: https://docs.openhands.dev/enterprise/environment-variables — which explicitly supports local/s3/google_cloud and does not restrict the feature to a particular sandbox backend).
Why this matters
The conversation-delete finalizer is the sole app-server capture path — the docstring of the real implementation calls it exactly that ("The sole app-server capture path"). 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. Compose users get Laminar tracesThut no artifacts, and nothing tells them.
Suggested fix
Implement archive_conversation_workspace on DockerSandboxService. The building blocks already exist in that class: it resolves the container, reads the session_api_key from container env, and builds agent-server URLs. The method can map stored sandbox → SandboxInfo → a runtime dict (url + session_api_key) → delegate to the shared workspace_archive.archive_workspace() (which already supports all three store backends). RemoteSandboxService._archive_workspace is the shape to mirror, and tests/unit/app_server/test_remote_sandbox_service.py has the test template to copy.
Environment
- Install: Docker Compose (
docker-compose.yml),DockerSandboxServicebackend - 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
Related
- Parent: Workspace archiving (RUNTIME_FILE_ARCHIVE_*) is remote-backend-only: no capture on any non-remote backend #1456
- Sibling: Idle/expiry sandbox reap (lifecycle worker) skips workspace archiving on all non-remote backends #1457 (idle/expiry reap path, lifecycle worker)
This issue was created by an AI agent (OpenHands) on behalf of Juan Michelini.
Activity
Archive conversation workspaces in the lifecycle reap path
fix(docker): archive conversation workspace on conversation delete (i…