GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode crashes on boot when models.dev is unreachable with no cache · Issue #35713 · anomalyco/opencode

opencode crashes on boot when models.dev is unreachable with no cache #35713

New issue
Copy link
New issue
Copy link
Closed
Closed
opencode crashes on boot when models.dev is unreachable with no cache#35713
Copy link
Assignees
jlongster

Description

@luiscga
luiscga
opened on Jul 7, 2026
Issue body actions

Description

If models.dev is unreachable and there's no local cache yet (fresh install, or cache cleared), opencode crashes on boot instead of degrading gracefully. The server dies mid-bootstrap and the TUI just shows:

Error: Unexpected server error. Check server logs for details.

and exits. Nothing in the UI, no toast, no partial startup - it just closes.

Log on the server side stops dead right after the fetch fails, nothing after it:

timestamp=2026-07-07T11:32:22.844Z level=INFO run=c20bd434 message=init
timestamp=2026-07-07T11:32:22.9xxZ level=ERROR run=c20bd434 message="Failed to fetch models.dev" cause="Cause([Fail(HttpClientError: Transport error (GET .../api.json) (cause: Error: Unable to connect. Is the computer able to access the url?))])"

(process exits here, no further log lines)

Looks like populate() in packages/core/src/models-dev.ts pipes the fetch through Effect.orDie, so a plain network failure turns into an unrecoverable defect that kills the whole instance bootstrap rather than just failing to load the catalog.

There's a second related spot: currentModel() in packages/opencode/src/session/prompt.ts also does provider.defaultModel().pipe(Effect.orDie), so if you already have a project with a saved model selection and the catalog ends up empty for the same reason, sending a prompt dies the same way instead of surfacing a normal error.

Plugins

None

OpenCode version

1.17.14

Steps to reproduce

  1. Make sure there's no cached catalog (rm ~/.cache/opencode/models.json or use a fresh XDG_CACHE_HOME)
  2. Point the fetch at something unreachable, e.g. OPENCODE_MODELS_URL=http://127.0.0.1:1
  3. Start opencode in a project directory
  4. It boots, then dies within a couple seconds with the error above

Screenshot and/or share link

No response

Operating System

macOS

Terminal

No response

Activity

  1. github-actions
    assigned
    jlongster
    on Jul 7, 2026
  2. github-actions commented on Jul 7, 2026

    @github-actions
    github-actionsBot
    on Jul 7, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • Desktop/Server: Auto-updater and models.dev fetch lack network resilience (excessive errors in restricted networks) #35090: Covers the same models.dev fetch failure on restricted/offline networks including the lack of local cache and cold-start crash — the scope is broader (also includes auto-updater), but the models.dev boot crash is the same root problem.
  3. luiscga commented on Jul 7, 2026

    @luiscga
    luiscga
    on Jul 7, 2026
    Author
    More actions

    This is already fixed in PR-35171

  4. luiscga
    closed this as completedon Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jlongster
    jlongster

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.