Skip to content

fix(cli): retry transient sandbox sync disconnects#2258

Draft
elezar wants to merge 1 commit into
mainfrom
codex/cli-sync-retry
Draft

fix(cli): retry transient sandbox sync disconnects#2258
elezar wants to merge 1 commit into
mainfrom
codex/cli-sync-retry

Conversation

@elezar

@elezar elezar commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

Retry sandbox upload and download operations when a gateway handoff interrupts the underlying transport. Retries rebuild the SSH session for each attempt and remain limited to typed transient failures; validation, local permission, remote command, and other permanent failures still return immediately.

Related Issue

Extracted from #1868 so the generally applicable CLI behavior can be reviewed independently.

Changes

  • Retry complete upload and download attempts up to four times after transient disconnects.
  • Preserve typed gRPC connection/status, SSH exit, and tar-stream I/O errors for classification.
  • Retry only gRPC Unavailable, connection transport errors, BrokenPipe, ConnectionReset, UnexpectedEof, and SSH exit 255.
  • Add deterministic async coverage for retry-then-success, retry exhaustion, and immediate permanent failure.

Testing

  • mise run pre-commit passes
    • Attempted, but the local task failed during environment setup: grpc_tools was unavailable while the new venv was still being populated, and workspace Clippy could not find z3.h outside the Nix environment. Format, license, Helm, and Markdown checks passed.
  • nix develop -c cargo test -p openshell-cli --lib (195 tests)
  • nix develop -c cargo clippy -p openshell-cli --all-targets -- -D warnings
  • E2E tests added/updated (not applicable; deterministic unit coverage exercises the retry policy)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

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