VSCode terminal reads auth config from ~/snap instead of ~/.local #9478

Open
opened 2026-02-16 18:12:32 -05:00 by yindo · 1 comment
Owner

Originally created by @v0l on GitHub (Feb 16, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When using opencode from vscode terminal installed from snap, the auth.json is loaded from a different (wrong?) path

This results in "User not found" errors between sessions in different terminals due to duplicate configs.

VSCode terminal:

INFO  2026-02-16T16:34:58 +152ms service=default version=1.2.5 args=["auth","--print-logs","--log-level=DEBUG","ls"] opencode

┌  Credentials ~/snap/code/224/.local/share/opencode/auth.json
│
└  0 credentials

Others

INFO  2026-02-16T16:36:47 +155ms service=default version=1.2.5 args=["auth","list","--print-logs"] opencode

┌  Credentials ~/.local/share/opencode/auth.json
│                                                                                                                                                                                                         
●  GitHub Copilot oauth
│                                                                                                                                                                                                         
●  OpenRouter api
│                                                                                                                                                                                                         
└  2 credentials

Plugins

No response

OpenCode version

1.2.5

Steps to reproduce

  1. Install VSCode on Ubuntu via snap
  2. Open terminal and run opencode

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04.4

Terminal

VsCode terminal (fish)

Originally created by @v0l on GitHub (Feb 16, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When using opencode from vscode terminal installed from snap, the `auth.json` is loaded from a different (wrong?) path This results in "User not found" errors between sessions in different terminals due to duplicate configs. ### VSCode terminal: ```bash INFO 2026-02-16T16:34:58 +152ms service=default version=1.2.5 args=["auth","--print-logs","--log-level=DEBUG","ls"] opencode ┌ Credentials ~/snap/code/224/.local/share/opencode/auth.json │ └ 0 credentials ``` ### Others ```bash INFO 2026-02-16T16:36:47 +155ms service=default version=1.2.5 args=["auth","list","--print-logs"] opencode ┌ Credentials ~/.local/share/opencode/auth.json │ ● GitHub Copilot oauth │ ● OpenRouter api │ └ 2 credentials ``` ### Plugins _No response_ ### OpenCode version 1.2.5 ### Steps to reproduce 1. Install VSCode on Ubuntu via snap 2. Open terminal and run `opencode` ### Screenshot and/or share link _No response_ ### Operating System Ubuntu 24.04.4 ### Terminal VsCode terminal (fish)
yindo added the bug label 2026-02-16 18:12:32 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 16, 2026):

This issue might be related to existing discussions about auth.json path resolution:

  • #5238: Where is the opencode auth.json stored when installed by brew on Linux?
  • #6669: Docs miss mentioning XDG base directories for global configuration while already supporting them

The snap-specific path issue you're experiencing appears to be distinct from those, but they may provide additional context around path resolution in different installation scenarios.

@github-actions[bot] commented on GitHub (Feb 16, 2026): This issue might be related to existing discussions about auth.json path resolution: - #5238: Where is the opencode auth.json stored when installed by brew on Linux? - #6669: Docs miss mentioning XDG base directories for global configuration while already supporting them The snap-specific path issue you're experiencing appears to be distinct from those, but they may provide additional context around path resolution in different installation scenarios.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9478