Skip to content

tui: false 'Session location unavailable' after restart (any transient location.sync failure) #57107

Closed as duplicate

Description

@AhmadAbusharshouh

Summary

After restarting OpenCode, restored session tabs sometimes show the blocking "Session location unavailable — Choose another directory to continue this session" prompt, even though the directory exists and the server resolves it fine. Looks like a regression of #46322 / #43415 in 2.0.32.

Environment

  • opencode version: 2.0.32
  • OS: Windows 11 (Windows_NT 10.0.26200, x64)
  • Terminal: Windows Terminal
  • Shell: PowerShell 5.1
  • Install/channel: latest (npm @opencode/cli)
  • Active plugins: oc-codex-multi-auth, @ex-machina/opencode-anthropic-auth, local TUI plugin

Reproduction

  1. Have several session tabs open in the home directory (~), plus another project open in a second TUI.
  2. Close OpenCode and start it again (the background service is restarted on launch).
  3. Open a restored session tab.

Expected Behavior

The session reconnects to its directory once the service is up. If a request fails briefly during startup, the TUI retries.

Actual Behavior

The session shows "Session location unavailable" for ~ and stays that way until the user picks a directory by hand. Choosing the same directory (~) works straight away.

After startup, every location request works for the same directory (/api/location, vcs, agent, command, integration, mcp, mcp/resource, model, provider, reference, skill, shell, form), both on a warm service and on a fresh opencode serve.

Additional Context

From the 2.0.32 bundle, the location provider sets error whenever any part of location.sync() rejects (any of 12 parallel requests), and the session view mounts session.location-missing whenever error.location.directory matches the session directory. The error is only cleared on the next server.connected event or a manual location change. So one transient failure during service startup becomes a permanent "location unavailable" prompt.

Suggestion: show this prompt only for LocationNotFoundError (404), and retry with backoff for other errors.

Frequency: intermittent, only right after a restart.

Activity

  1. opencode-agent commented on Oct 19, 2026

    @opencode-agent
    Contributor

    Thanks for the clear write-up and for tracking down the cause in the bundle. I think this is a duplicate of #55250. It's the same cause: one transient failure during the location sync puts up the "Session location unavailable" prompt even though the directory is fine. Your trigger is a restart rather than a dropped network connection, but the code path is the same.

    Possible duplicates and related issues, most likely first:

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  2. opencode-agent commented on Oct 20, 2026

    @opencode-agent
    Contributor

    We haven't heard back, so I'm closing this as a duplicate of #55250. Both come from the same cause: a single transient failure in the location sync shows the "Session location unavailable" prompt. Please follow #55250 for progress. #43415 covers the restart case, and two open PRs address the problem: #55940 (show the prompt only for LocationNotFoundError) and #55258 (retry the sync). If your problem turns out to be different, reply here and it can be reopened. Thanks again for the detailed analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions