Skip to content

TUI: migration failure shows 10s toast with no recovery #56155

Closed as not planned

Description

@Addin

Summary

Migration failure shows a 10s toast with no recovery action, and one transient poll error permanently stops the overlay poll loop.

Root cause

packages/tui/src/component/migration-overlay.tsx:28-37:

// A single transient API error kills the whole poll loop
// Any throw from client.api.migration.v1.status exits the while(true) loop permanently

Suggested fix

Add retry/backoff to the poll loop, add a retry action to the error toast, and don't let one transient error kill polling permanently.

Activity

  1. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    Thanks for the write-up, @Addin. You're right that a single error from migration.v1.status currently ends the overlay's poll loop and shows the error toast.

    A very similar change was proposed in #42188 (retry migration status transport errors). It was closed because we had no real migration failure or regression test showing the problem, so we'd like to base any fix on a case that actually happened. Did you run into this yourself? If so, could you share:

    • The output of opencode --version, your OS, how you installed OpenCode, and your terminal
    • What you were doing when it happened (first launch after upgrading from v1, the background service restarting, a network or sleep/resume event, etc.)
    • The exact text of the "Data migration failed" toast
    • Whether the migration actually finished in the background (for example, whether your v1 sessions showed up later or after a restart), and any relevant lines from the logs

    You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.

    Related issues, ordered by likelihood:

  2. Addin commented on Oct 16, 2026

    @Addin
    Author

    Thank you for the context. I see that #42188 (retry migration status transport errors) was closed because there were no real migration failures to test against.

    I still think the lack of retry/backoff in the migration overlay poll loop is a latent issue worth addressing, even if migration failures are rare:

    1. Transient network issues: Even if migration itself rarely fails, network blips during the poll could cause client.api.migration.v1.status to throw, permanently killing the poll loop until the user restarts the TUI.

    2. No user recovery: When the poll loop dies, the overlay shows a stale state with no way for the user to retry except closing and reopening the TUI.

    3. fix(tui): retry migration status transport errors #42188 was closed for lack of evidence, not because the issue doesn't exist: The fact that no one has reported migration failures doesn't mean they can't happen - it may just mean users restart the TUI when they encounter it.

    Suggested fix: Add exponential backoff (e.g., 1s → 2s → 4s → max 30s) and a "Retry" button in the error state. This would make the migration overlay more resilient without requiring migration failures to be common.

    I'll keep this issue open as a resilience improvement.

  3. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    Thanks for following up, @Addin. That makes sense as a resilience improvement, so I'm treating this as a feature request rather than a bug report.

    In short: make the migration overlay's status polling survive transient errors with exponential backoff (e.g. 1s → 2s → 4s, max 30s) instead of stopping at the first error, and add a Retry action to the error state so users don't have to restart the TUI.

    Maintainers will consider it. For context, a narrower version (retrying only transport errors) was proposed in #42188 and closed for now because there was no captured failure or regression test. Any version of this would probably need a test that simulates a transport error during polling.

    Related:

    If you do run into the poll loop dying in practice, please add your opencode --version, OS and terminal, and the exact toast text here. That would turn this into a concrete bug we can reproduce.

  4. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    Thanks for reviewing the migration overlay. This request doesn't include an observed polling failure; the earlier retry proposal in #42188 was also closed pending a captured failure or regression test. We're closing this for now; if it happens in practice, please share your version, steps and exact error.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions