Skip to content

fix: show sandbox creation progress#76

Open
lox wants to merge 2 commits intomainfrom
codex/sandbox-create-spinner
Open

fix: show sandbox creation progress#76
lox wants to merge 2 commits intomainfrom
codex/sandbox-create-spinner

Conversation

@lox
Copy link
Copy Markdown
Contributor

@lox lox commented Mar 8, 2026

Summary

  • add a TTY-only spinner while CreateSandbox is blocked on provisioning
  • reuse the spinner for direct sandbox create and implicit sandbox creation from exec
  • add integration coverage for delayed provisioning so progress output is exercised

Testing

  • mise exec -- go test ./...

First-time image preparation can block sandbox creation long enough that the CLI looks hung. Add a TTY-only spinner around CreateSandbox so users get immediate feedback while provisioning is still in progress.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 971ff8bc58

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if stderr == nil {
return
}
_, _ = fmt.Fprintf(stderr, "\r[%s] Preparing sandbox (first use may take a bit)... %s", frame, formatSandboxProgressDuration(elapsed))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear spinner line on each frame update

The frame writer only prefixes with \r and never clears the current line, so once the elapsed string becomes shorter (for example transitioning from 950ms to 1.1s after ~1s of provisioning) stale suffix characters remain on screen, producing garbled progress text during long sandbox creation. This is user-visible whenever provisioning takes long enough for the formatted duration width to shrink, and it can be fixed by clearing the line (or using fixed-width formatting) before each frame write.

Useful? React with 👍 / 👎.

Make sandbox creation progress honor the CLI's ANSI policy and only report success after the create response has been validated. Add regression tests for failure reporting and NO_COLOR behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant