Skip to content

TUI hangs on blank screen when mimo -c is run in a directory with no prior sessions #758

@HaleTom

Description

@HaleTom

Description

When running mimo -c (continue mode) in a directory that has no prior sessions, the TUI hangs on a blank screen. With --print-logs, the root cause is visible: the TUI sets sessionID: "dummy" as a placeholder route, which fails server-side validation because session IDs must start with "ses". The validation rejection error is logged but never surfaced to the user, and the TUI never resolves to a valid session because there are no sessions to continue.

A secondary issue: when this occurs, models.dev fetch times out, compounding the hang.

Steps to reproduce

  1. mkdir ~/tmp/mimo
  2. cd ~/tmp/mimo
  3. mimo --prompt "hi" (creates a session)
  4. Press ESC ESC then /quit
  5. mkdir subdir && cd subdir
  6. mimo -c — hangs on blank screen
  7. mimo -c --print-logs — shows the errors below

Log output

ERROR 2026-06-15T17:57:42 +32ms service=server-proxy e={
  "data": {
    "sessionID": "dummy"
  },
  "error": [
    {
      "origin": "string",
      "code": "invalid_format",
      "format": "starts_with",
      "prefix": "ses",
      "path": ["sessionID"],
      "message": "Invalid string: must start with \"ses\""
    }
  ],
  "success": false
} rejection
ERROR 2026-06-15T17:57:50 +7965ms service=models.dev error=The operation timed out. Failed to fetch models.dev

Root cause

In packages/opencode/src/cli/cmd/tui/app.tsx:174, when -c is passed, the initial route is set to:

sessionID: "dummy"

This triggers server-side validation in packages/opencode/src/id/id.ts:6,20 where Identifier.schema("session") validates that session IDs must start with "ses". The placeholder "dummy" fails this check.

The intended flow (lines 380-397) is that an effect waits for the session list to load, then navigates to the real session. But when there are no sessions to continue, the navigation never happens, and the TUI remains stuck on the invalid "dummy" route.

Expected behavior

When mimo -c is run in a directory with no prior sessions, the TUI should:

  • Display an error message indicating there is no session to continue

Actual behavior

TUI hangs on a blank screen with no feedback to the user.

Operating System

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions