Skip to content

Workspace transport: clone-in-sandbox mode with branch/patch return #3760

Done

Description

@integry

Worktrees are created on the worker under /tmp/git-processor/worktrees and bind-mounted at /home/node/workspace; compose relies on identical paths on both sides. Remote runtimes (and a Docker host that is not the worker) cannot use bind mounts.

Acceptance:

  • WorkspaceTransport abstraction with two modes: bind (today) and clone (runtime clones the repo at the task base ref using a short-lived, repo-scoped GitHub installation token, then returns the result).
  • Result return: push to a temporary ref (e.g. refs/propr/runs/) that the worker fetches, with a patch/bundle upload fallback via the runtime file API.
  • Worker keeps ownership of commits/PRs: it fetches the run result into the existing worktree and continues the normal PR flow, so PR, review and followup behaviour is unchanged.
  • Token never persisted in the sandbox after the run; temporary refs cleaned up.
  • Tests cover both modes and a failed/aborted run.

Implementation

Add packages/core/src/git/workspaceTransport.ts. Extend AgentRunSpec.workspace with mode. DockerRuntime keeps bind by default but can run clone mode (useful for a remote DOCKER_HOST). Reuse worktreeCreation.ts / worktreeOperations.ts for the worker side fetch.

Activity

  1. propr-dev commented on Nov 24, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3760/claude-opus-5-5-workspace-transport-clone-20261124-0506-9sp
    • Base Branch: 3758-epic-runtime-abstraction-sc0
    • Worktree: issue-3760-20261124-0506-claude-opus-5-5-9sp

    🔍 Track Task Execution

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions