Description
In the desktop app, clicking New session while a project is selected creates the session bound to the shared service's default location (the user home) instead of the selected project directory. The session runs and is open in a tab, but that project's session list stays empty ("Nada por aqui ainda", badge 0), so the chat looks lost.
Plugins
None.
OpenCode version
2.0.16 (desktop app, channel latest)
Steps to reproduce
- Make the shared service's default location be the user home (here it was
C:\Users\<user> after the app restarted with cleared persisted state).
- In the desktop app select project
D:\<path>\00 - Pesca and click New session.
- Send one message so the session is persisted.
- Inspect the API:
GET /api/session/<id> returns location.directory = C:\Users\<user> (not the selected project), and GET /api/session?directory=D:\<path>\00 - Pesca returns []. The project UI shows 0 sessions while the session tab is open.
Screenshot and/or share link
N/A - described above.
Operating System
Windows 11 - Windows NT 10.0.26200 (win32 x64)
Terminal
OpenCode Desktop (Electron 44 / Chrome 152), not a terminal.
Additional context
- Server log:
worktree discovery failed directory="C:\Users\<user>" strategy=git.
- Workaround:
POST /api/session/<id>/move {"directory":"D:\<path>\00 - Pesca"} (the session_move tool) rebinds the session; it then appears in the project list.
- Expected: the client should pass the selected project directory when creating a session and the server must not silently fall back to its default location; a session open in a tab should always be listed under its project.
Description
In the desktop app, clicking New session while a project is selected creates the session bound to the shared service's default location (the user home) instead of the selected project directory. The session runs and is open in a tab, but that project's session list stays empty ("Nada por aqui ainda", badge
0), so the chat looks lost.Plugins
None.
OpenCode version
2.0.16 (desktop app, channel
latest)Steps to reproduce
C:\Users\<user>after the app restarted with cleared persisted state).D:\<path>\00 - Pescaand click New session.GET /api/session/<id>returnslocation.directory = C:\Users\<user>(not the selected project), andGET /api/session?directory=D:\<path>\00 - Pescareturns[]. The project UI shows0sessions while the session tab is open.Screenshot and/or share link
N/A - described above.
Operating System
Windows 11 - Windows NT 10.0.26200 (win32 x64)
Terminal
OpenCode Desktop (Electron 44 / Chrome 152), not a terminal.
Additional context
worktree discovery failed directory="C:\Users\<user>" strategy=git.POST /api/session/<id>/move {"directory":"D:\<path>\00 - Pesca"}(thesession_movetool) rebinds the session; it then appears in the project list.