@@ -139,6 +139,12 @@ starting that upstream process:
139139If your provider uses environment variables for auth, export them before
140140starting ` opencode serve ` .
141141
142+ Do not assume startup-script env vars always erase previously persisted
143+ OpenCode auth state for the deployed user. When debugging provider-auth
144+ surprises, inspect the deployed user's HOME/XDG config directories and the
145+ OpenCode files stored there before concluding that ` opencode-a2a ` changed the
146+ credential selection.
147+
142148Then start ` opencode-a2a ` against that explicit upstream URL:
143149
144150``` bash
@@ -151,6 +157,23 @@ OPENCODE_WORKSPACE_ROOT=/abs/path/to/workspace \
151157opencode-a2a serve
152158```
153159
160+ ## Troubleshooting Provider Auth State
161+
162+ If one deployment works while another fails against the same upstream provider,
163+ check the deployed OpenCode user's local state before assuming the difference
164+ comes from the ` opencode-a2a ` package itself.
165+
166+ - Provider auth and service-level model defaults belong to ` opencode serve ` .
167+ - The deployed user's HOME/XDG config directories are operational input.
168+ - Existing OpenCode auth/config files may still influence runtime behavior even
169+ when you also inject provider env vars from a process manager or shell
170+ wrapper.
171+ - Compare the deployed user's OpenCode auth/config files, HOME/XDG values, and
172+ effective workspace directory before blaming the A2A adapter layer.
173+ - For OpenCode-specific auth/config troubleshooting, inspect files such as
174+ ` ~/.local/share/opencode/auth.json ` and ` ~/.config/opencode/opencode.json `
175+ (or the equivalent XDG-resolved paths for that service user).
176+
154177## Core Behavior
155178
156179- The service forwards A2A ` message:send ` to OpenCode session/message calls.
0 commit comments