[BUG] opencode web: Error: The response redirected too many times #4620

Closed
opened 2026-02-16 17:44:49 -05:00 by yindo · 2 comments
Owner

Originally created by @e792a8 on GitHub (Jan 10, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

When running opencode web, the web interface displays the following error:

{"name":"UnknownError","data":{"message":"Error: The response redirected too many times. For more information, pass `verbose: true` in the second argument to fetch()"}}

This error appears to occur when connecting to OpenCode server from the web interface.

Steps to Reproduce

  1. Run opencode web
  2. Open the web interface in browser
  3. The error is displayed on the page

OpenCode Version

1.0.152

Environment

  • OS: Linux
  • Browser: Chrome (based on error format similar to JSON error responses)
  • Command: opencode web

Context

This appears to be a redirect loop occurring between the web client and OpenCode server. The error message suggests using verbose: true for debugging, but this is not a standard JavaScript fetch() option - it appears to be a custom OpenCode feature that may not be documented.

Related Issues

  • Issue #6277: Similar "redirected too many times" error with opencode serve and opencode web - Closed (resolved in v1.0.207)
  • Current version: 1.0.152 (older than the fix in #6277)

Notes

The error persists even after the fix mentioned in #6277, suggesting either:

  1. The fix was not backported or regressed
  2. This is a different underlying issue causing similar symptoms
  3. The redirect loop detection logic needs improvement or better error messaging

The verbose: true suggestion in the error message indicates there may be additional debugging options available, but users are not aware of them. If such options exist, they should be documented.

Originally created by @e792a8 on GitHub (Jan 10, 2026). Originally assigned to: @adamdotdevin on GitHub. ## Description When running `opencode web`, the web interface displays the following error: ```json {"name":"UnknownError","data":{"message":"Error: The response redirected too many times. For more information, pass `verbose: true` in the second argument to fetch()"}} ``` This error appears to occur when connecting to OpenCode server from the web interface. ### Steps to Reproduce 1. Run `opencode web` 2. Open the web interface in browser 3. The error is displayed on the page ### OpenCode Version 1.0.152 ### Environment - OS: Linux - Browser: Chrome (based on error format similar to JSON error responses) - Command: `opencode web` ### Context This appears to be a redirect loop occurring between the web client and OpenCode server. The error message suggests using `verbose: true` for debugging, but this is not a standard JavaScript `fetch()` option - it appears to be a custom OpenCode feature that may not be documented. ### Related Issues - Issue #6277: Similar "redirected too many times" error with `opencode serve` and `opencode web` - **Closed** (resolved in v1.0.207) - Current version: 1.0.152 (older than the fix in #6277) ### Notes The error persists even after the fix mentioned in #6277, suggesting either: 1. The fix was not backported or regressed 2. This is a different underlying issue causing similar symptoms 3. The redirect loop detection logic needs improvement or better error messaging The `verbose: true` suggestion in the error message indicates there may be additional debugging options available, but users are not aware of them. If such options exist, they should be documented.
yindo added the web label 2026-02-16 17:44:49 -05:00
yindo closed this issue 2026-02-16 17:44:49 -05:00
Author
Owner

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

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

  • #6277: wsl opencode serve show UnknownError - This issue reports the exact same "redirected too many times" error and was resolved in v1.0.207. Since you're on v1.0.152 (older than the fix), upgrading OpenCode to v1.0.207 or later may resolve your issue.

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

@github-actions[bot] commented on GitHub (Jan 10, 2026): This issue might be a duplicate of existing issues. Please check: - #6277: wsl opencode serve show UnknownError - This issue reports the exact same "redirected too many times" error and was resolved in v1.0.207. Since you're on v1.0.152 (older than the fix), upgrading OpenCode to v1.0.207 or later may resolve your issue. Feel free to ignore if none of these address your specific case.
Author
Owner

@e792a8 commented on GitHub (Jan 10, 2026):

Was using pnpm to install opencode. Switched to standalone install script version, no such problem.

@e792a8 commented on GitHub (Jan 10, 2026): Was using pnpm to install opencode. Switched to standalone install script version, no such problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4620