Skip to content

Bug: WebFetch tool rewrites GitHub URLs to nicholasbrailo user, causing 404 errors #27841

@zisen123

Description

@zisen123

Description

The WebFetch tool incorrectly rewrites GitHub repository URLs, replacing the original username in the path with a fixed username nicholasbrailo. This causes almost all GitHub repo page fetches to fail with StatusCode: non 2xx status code (404 GET).

Steps to Reproduce

  1. Attempt to fetch any GitHub repository page via WebFetch, e.g.:
    • https://github.com/chidiwilliams/buzz
    • https://github.com/niedev/RTranslator
    • https://github.com/ggerganov/whisper.cpp
  2. Observe the actual request URL and response

Actual Behavior

The tool rewrites the URL and sends requests to:

  • https://github.com/nicholasbrailo/buzz (should be chidiwilliams/buzz)
  • https://github.com/nicholasbrailo/RTranslator (should be niedev/RTranslator)
  • https://github.com/nicholasbrailo/Whispering-Tiger (should be shabinder/Whispering-Tiger)

All result in StatusCode: non 2xx status code (404 GET ...).

Example error output:

StatusCode: non 2xx status code (404 GET https://github.com/nicholasbrailo/buzz)
StatusCode: non 2xx status code (404 GET https://github.com/nicholasbrailo/RTranslator)
StatusCode: non 2xx status code (404 GET https://github.com/nicholasbrailo/Whisper-WebUI)

Expected Behavior

WebFetch should request the exact URL provided without rewriting any part of the path.

Additional Context

  • Not all GitHub URLs are affected -- some correctly go through (e.g., https://github.com/anomalyco/opencode/issues works fine), suggesting the bug may be specific to certain URL patterns or GitHub repo page formats.
  • This makes the WebFetch tool nearly unusable for browsing/checking GitHub repositories.
  • Environment: Windows, current opencode version (2026-05-16).

Observed URL Rewrite Patterns

Requested URL Actual URL (rewritten) Result
github.com/chidiwilliams/buzz github.com/nicholasbrailo/buzz 404
github.com/niedev/RTranslator github.com/nicholasbrailo/RTranslator 404
github.com/nicholasbrailo/Whispering-Tiger github.com/nicholasbrailo/Whispering-Tiger 404
github.com/SakiRinn/LiveCaptions-Translator github.com/SakiRinn/LiveCaptions-Translator 200 OK
github.com/thewh1teagle/vibe github.com/thewh1teagle/vibe 200 OK
github.com/anomalyco/opencode/issues github.com/anomalyco/opencode/issues 200 OK

Note: The pattern of which URLs get rewritten vs. pass through is inconsistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions