Skip to content

Forbidden: upstream connect error or disconnect/reset before headers. reset reason: connection termination #9377

Closed

Description

@passerhub

Description

  1. 当本地大模型服务出现title描述的问题的时候,opencode就停止了当前任务,不再重试.
  2. 如果给opencode新的提示: "继续" / "重试",opencode 就开始了无尽的工作,自我提示用户要求继续或者重试,然后把干过的活在一次次的重复,基本就停不下来了.

Plugins

oh-my-opencode

OpenCode version

1.1.25

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04

Terminal

与终端无关, vscode/tmux/bash都可以重现.

Activity

  1. github-actions commented on Jan 19, 2026

    @github-actions
    Contributor

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

    The core issue appears to be that when OpenCode encounters a connection error from a local model service, it either stops retrying or enters an infinite retry loop when asked to continue. This suggests a systematic problem with how retry logic and error recovery are handled for transient failures.

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

  2. passerhub commented on Jan 31, 2026

    @passerhub
    Author

    Forbidden: upstream connect error or disconnect/reset before headers. reset reason: connection termination

    这个错误出现在使用反向代理访问大模型的偶发错误,一旦发生,agent会停止工作,除非人工干预.特别是sub agent,不切换过去是很难发现的.

    希望能把这个error归为类似502/504的错误,opencode可以持续重试,一般会成功的.

    Image
  3. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions