Skip to content

Workspace archiving (RUNTIME_FILE_ARCHIVE_*) is remote-backend-only: no capture on any non-remote backend #1456

Open
1 of 2 issues completed

Description

@juanmichelini

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


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

Sub-issues

Sub-issues

1 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    bug
    on Nov 19, 2026
  2. changed the title [-]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[/+] on Nov 19, 2026
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