Skip to content

OpenCode Desktop keeps restoring old project (frisiusmc2025) instead of selected project (groningenairport2023) #32847

Closed as not planned

Description

@svellemaiwink

Description

OpenCode Desktop keeps binding the active chat/session to an old project (frisiusmc2025), even when I explicitly open groningenairport2023.
In the active chat, the working directory remains frisiusmc2025.

Environment

OpenCode Desktop: 1.16.2
macOS
User data directory: ~/Library/Application Support/ai.opencode.desktop
Expected behavior

When I open /Users/sakevellema/projects/groningenairport2023, the active/new session should use that project.
lastProject and workspace state should switch to groningenairport2023.
Actual behavior

opencode.global.dat repeatedly reverts to:
server.lastProject.local = /Users/sakevellema/projects/frisiusmc2025
server.projects.local = [frisiusmc2025]
layout.page.lastProjectSession may contain both projects, but the active session still resolves to frisius.
Even after resetting profile/state and explicitly opening airport, the chat returns to frisius context.

Plugins

“I’m not using any OpenCode plugins (plugin is not set in my config). I only have two MCP servers enabled: figma (remote, localhost) context7 (local @upstash/context7-mcp)”

OpenCode version

Version 1.16.2 (1.16.2)

Steps to reproduce

Steps to reproduce

Open OpenCode with an existing session on frisiusmc2025.
Open/select /Users/sakevellema/projects/groningenairport2023.
Ask “which project is this?” (or check cwd).
It still reports/uses frisiusmc2025.
What I already tried

Manually edited opencode.global.dat (server.lastProject, projects.local, layout.page.lastProjectSession).
Renamed/removed opencode.global.dat*.
Full profile reset:
moved ~/Library/Application Support/ai.opencode.desktop and let it recreate.
Started app with explicit project path:
open -na OpenCode "/Users/.../groningenairport2023"
Started with alternate --user-data-dir.
Fully closed app processes (pkill) between attempts.
Helpful observation

It looks like session restore from an existing chat immediately writes state back to frisius as soon as that session becomes active.
So even correct state edits get overwritten right away.
Impact

Project switching is unreliable; old session/project context keeps taking over.
Relevant files

~/Library/Application Support/ai.opencode.desktop/opencode.global.dat
~/Library/Application Support/ai.opencode.desktop/opencode.workspace*.dat

Screenshot and/or share link

No response

Operating System

Macos 26.5.1

Terminal

iterm2

Activity

  1. github-actions commented on Jun 18, 2026

    @github-actions
    Contributor

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

  2. github-actions commented on Aug 18, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  3. Hona commented on Sep 2, 2026

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

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