Skip to content

Docker: conversation-delete workspace archive is a silent no-op (implement archive_conversation_workspace on DockerSandboxService) #1458

Closed

Description

@juanmichelini

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 True

The 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), DockerSandboxService 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

Related


This issue was created by an AI agent (OpenHands) on behalf of Juan Michelini.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions