Cannot 'attach' to an opencode server with a password #6554

Closed
opened 2026-02-16 18:04:34 -05:00 by yindo · 1 comment
Owner

Originally created by @willtunnels on GitHub (Jan 16, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Unless I'm missing something, there is currently no way to attach to an opencode server with a password from the terminal. Attempting to do so returns 'Unauthorized', even if the client is run in a shell with OPENCODE_SERVER_PASSWORD set.

Plugins

No response

OpenCode version

1.1.25

Steps to reproduce

  1. OPENCODE_SERVER_PASSWORD=foo opencode serve
  2. OPENCODE_SERVER_PASSWORD=foo opencode attach http://127.0.0.1:4096

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04 (WSL)

Terminal

Windows Terminal

Originally created by @willtunnels on GitHub (Jan 16, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Unless I'm missing something, there is currently no way to attach to an opencode server with a password from the terminal. Attempting to do so returns 'Unauthorized', even if the client is run in a shell with `OPENCODE_SERVER_PASSWORD` set. ### Plugins _No response_ ### OpenCode version 1.1.25 ### Steps to reproduce 1. `OPENCODE_SERVER_PASSWORD=foo opencode serve` 2. `OPENCODE_SERVER_PASSWORD=foo opencode attach http://127.0.0.1:4096` ### Screenshot and/or share link _No response_ ### Operating System Ubuntu 24.04 (WSL) ### Terminal Windows Terminal
yindo added the windowsbug labels 2026-02-16 18:04:34 -05:00
yindo closed this issue 2026-02-16 18:04:34 -05:00
Author
Owner

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

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

  • #8458: [FEATURE]: Attach to authenticated OC Server - Directly requests the ability to attach to authenticated servers with credentials
  • #8676: fix: Plugin client returns 401 Unauthorized when OPENCODE_SERVER_PASSWORD is set (Desktop) - Related Unauthorized errors with OPENCODE_SERVER_PASSWORD
  • #8173: OPENCODE_SERVER_PASSWORD in env prevents user from working in TUI - Similar issue where the password env var causes Unauthorized errors

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #8458: [FEATURE]: Attach to authenticated OC Server - Directly requests the ability to attach to authenticated servers with credentials - #8676: fix: Plugin client returns 401 Unauthorized when OPENCODE_SERVER_PASSWORD is set (Desktop) - Related Unauthorized errors with OPENCODE_SERVER_PASSWORD - #8173: OPENCODE_SERVER_PASSWORD in env prevents user from working in TUI - Similar issue where the password env var causes Unauthorized errors Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6554