Skip to content

bug: sandbox create progress repeats 'Sandbox allocated' during image pull #2674

Closed

Description

@rhuss

Agent Diagnostic

  • Skills loaded: create-github-issue, openshell-cli
  • OpenShell version tested: 0.0.101
  • Latest release checked: unable to verify (testing against dev build)
  • Known fixes reviewed: unable to verify
  • Possible duplicates reviewed: searched "sandbox allocated progress repeat" and "sandbox create progress display", no results
  • Findings: The CLI's sandbox create progress renderer emits a new line for every gRPC status poll response instead of updating in-place. During image pull (which can take 30-60s), the status stays at "Sandbox allocated" while the container runtime pulls the image, producing dozens to hundreds of identical lines.
  • Remaining reason for filing: The output floods the terminal and obscures the actual progress information.

Description

Actual behavior: When creating a sandbox with a large or uncached container image, openshell sandbox create prints "Sandbox allocated (0s)" on a new line for every status poll iteration while the image is being pulled. This produces 30-100+ identical lines depending on pull duration:

✓ Sandbox allocated (0s)
✓ Sandbox allocated (0s)
✓ Sandbox allocated (0s)
✓ Sandbox allocated (0s)
... (repeats dozens of times)
✓ Image already present
✓ Starting sandbox

Expected behavior: The progress display should either:

  1. Update the current line in-place (overwrite with \r or terminal cursor control) when the status hasn't changed, or
  2. Deduplicate consecutive identical status messages and only print when the phase or message text changes, or
  3. Show a spinner/progress indicator for long-running phases like image pull

Reproduction Steps

  1. Create a sandbox using an image that isn't cached in the container runtime:
    openshell sandbox create --name test \
      --from <large-uncached-image>:latest \
      --no-tty -- sh -c "echo ready"
  2. Observe the terminal output during image pull

The issue is most visible with the Docker compute driver inside SAW VMs where image pulls go through the internal OpenShift registry. Images cached locally produce only 1-2 lines (no delay between allocation and start).

Environment

  • OS: macOS (client), Fedora 44 (VM/sandbox host)
  • Compute driver: Docker (inside SAW VM on OpenShift Virtualization)
  • OpenShell CLI: 0.0.101
  • Gateway: 0.0.102-dev.4
  • Latest release checked: no
  • Possible duplicates checked: yes, none found

Activity

  1. letv1nnn commented on Aug 10, 2026

    @letv1nnn
    Contributor

    Hey @rhuss, I think I hit this in #2655 too, screenshot there shows Sandbox allocated (0s) twice on a quick provision, no large/uncached image. So it's probably not pull-specific, it happens any time that step takes a bit longer, because the server sends the same progress update more than once.

  2. modified the milestone: OpenShell Beta on Aug 10, 2026
  3. added
    state:acceptedA maintainer decided OpenShell should pursue this issue
    and removed
    state:triage-neededOpened without agent diagnostics and needs triage
    on Aug 13, 2026
  4. franciscojavierarceo commented on Aug 18, 2026

    @franciscojavierarceo

    📋 triage-agent

    Triage Assessment

    Classification: validated-bug

    Summary

    The report is confirmed. Repeated provisioning completion events are deduplicated in the interactive display, but plain/non-interactive output prints a line for every repeated event. This matches the reported --no-tty behavior.

    Investigation

    • crates/openshell-cli/src/commands/common.rs maps the requesting-sandbox completion event to Sandbox allocated.
    • Interactive ProvisioningDisplay deduplicates completed steps.
    • Plain output directly calls println! for every completion event and has no deduplication.
    • The comment linking feat(cli): warn when --env values look like credentials #2655 corroborates that duplicate events occur during delayed provisioning, not only image pulls.

    Impact Signals

    • Affected users/scope: CLI users using non-interactive/plain sandbox creation output.
    • Regression: unknown.
    • Workaround: use interactive output or tolerate/filter duplicate lines.
    • Evidence quality: high.

    Human Decision Status

    This issue is already labeled state:accepted. No acceptance or intake-state label was changed. The likely fix is to deduplicate consecutive completion events in plain output, with regression coverage for repeated identical events.

  5. krishicks commented on Aug 27, 2026

    @krishicks
    Collaborator

    Fixed by #2816

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

    state:acceptedA maintainer decided OpenShell should pursue this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions