Skip to content

opencode -c shows dashboard before resuming session #5815

@anntnzrb

Description

@anntnzrb

Description

When using opencode -c to continue the last session, the dashboard/home screen briefly appears before the resumed session loads. This is confusing because it looks like a new session is starting, then suddenly switches to the resumed session after 1-3 seconds.

Root cause: The session list is loaded in the non-blocking phase of bootstrap, but the continue effect waits for all data to load (sync.status === "complete"). Meanwhile, the route defaults to "home", so the dashboard renders while waiting.

Proposed fix: When -c flag is provided:

  1. Move session.list() to the blocking phase in sync.tsx
  2. Trigger the continue navigation at "partial" status instead of "complete" in app.tsx

This eliminates the dashboard flash entirely by ensuring session data is available immediately.

OpenCode version

latest (80eac96)

Steps to reproduce

  1. Start opencode and create a session with some messages
  2. Exit opencode
  3. Run opencode -c to resume the last session
  4. Observe the dashboard appearing briefly before the session loads

Operating System

Any (macOS, Linux, Windows)

Terminal

Any

Metadata

Metadata

Assignees

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