Skip to content

[Bug]: Large repository clones time out after 5 minutes and restart from scratch #932

Description

@hannesrudolph

Preflight

  • I searched existing issues and docs before opening this.
  • I removed secrets, tokens, private keys, customer data, and private repository details.
  • This report describes observed behavior, not a speculative rewrite request.

Summary

A worker cannot prepare a repository whose full Git clone takes longer than five minutes. The clone command is killed at the fixed timeout, the partial checkout is deleted, and the next retry repeats the full transfer from zero. The task remains in preparing and will eventually fail after all retries are exhausted.

Affected surface

  • Roomote agent task
  • Worker or controller
  • Setup, deployment, or upgrade

Steps to reproduce

  1. Run Roomote from a source checkout with Docker compute enabled.
  2. Create a task that prepares a sufficiently large repository from GitHub.
  3. Observe worker setup while the initial full clone needs more than five minutes.

Expected behavior

Repository preparation should either complete or fail with actionable diagnostics. Self-hosted deployments should have a way to accommodate large repositories without restarting the same full clone repeatedly.

Actual behavior

WorkspaceManager executes a full git clone with timeout: 300 and retries: 4:

run: `rm -rf -- '${shellEscape(fullName)}' && git clone '${shellEscape(cloneUrl)}' '${shellEscape(fullName)}'`,
retries: 4,
timeout: 300,

The retry loop deletes the partial target before every attempt. In one observed run, the worker logged failures exactly five minutes apart:

2026-07-31T05:19:03Z Cloning <redacted>
2026-07-31T05:24:03Z [Git clone] Attempt 1/5 failed. Retrying in 1000ms...
2026-07-31T05:29:04Z [Git clone] Attempt 2/5 failed. Retrying in 1000ms...
2026-07-31T05:34:05Z [Git clone] Attempt 3/5 failed. Retrying in 1000ms...

The worker was actively downloading and indexing the pack and had sufficient disk space, but no attempt could reach completion before the timeout. The standard retry log did not retain the underlying Git stderr, so the UI and logs do not make the cutoff obvious.

Version

main@327961f

Installation method

Source checkout / development

Deployment context

Self-hosted Docker compute, with the worker running a Linux ARM64 image.

Diagnostics

Relevant code:

  • apps/worker/src/workspace/workspace-manager.ts (Git clone command, timeout, and partial-target cleanup)
  • apps/worker/src/command-executor/command-executor.ts (generic retry logging)

Notes

Potential fixes:

  • Make the clone timeout configurable or adaptive for self-hosted workers.
  • Preserve or resume a partial clone where safe instead of deleting it before every retry.
  • Consider a shallow or partial clone option for initial workspace setup.
  • Include the failed Git command's sanitized stderr and timeout cause in task diagnostics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions