Uh oh!
There was an error while loading. Please reload this page.
fix(opencode): pass missing auth headers in run --attach - #16097
Conversation
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: feat(github-action): Support remote server connection via --attach (#15866)
However, this appears to be a feature addition for GitHub Actions rather than a direct duplicate of the auth headers bug fix. The current PR (#16097) is specifically addressing a bug where auth headers are missing when using No duplicate PRs found |
Fixesanomalyco#16096 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c8a6687 to
35405a3CompareCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Consolidates auth header logic from worker.ts and attach.ts into a shared util used by run.ts, attach.ts, and worker.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Match existing inline pattern from attach.ts instead of extracting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Match attach.ts pattern: accept --password/-p flag and fall back to OPENCODE_SERVER_PASSWORD env var. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Matches the pattern in worker.ts to support non-default usernames. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com> (cherry picked from commit 18fb19d)
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
…#16097) Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Issue for this PR
Closes#16096
Type of change
What does this PR do?
Adds missing Basic auth headers to
runcommand, just likeattach.How did you verify your code works?
Relied on tests (that I've since removed to be consistent with the other patterns) and comparing
runagainstopencode servevs. one with Basic auth (like whatOpenCode.appstarts):✅
opencode --attach http://127.0.0.1:45103 --dir ~/workspace run howdy❌
OPENCODE_SERVER_USERNAME=opencode OPENCODE_SERVER_PASSWORD=hunter2 opencode --attach=localhost:4096 run howdyChecklist
Notes
I originally started refactoring out a
getAuthorizationHeaderutility based onopencode/packages/opencode/src/cli/cmd/tui/worker.ts
Line 147 in 85ff056
opencode/packages/opencode/src/cli/cmd/tui/attach.ts
Lines 63 to 68 in 85ff056
I did use AI to author this because I was in the middle of another project when I finally asked Claude "Wait, is this an opencode bug??" and wound up here.
I'm sorry. 😔