Skip to content

macOS: Repeated model request stream disconnections and remote compaction v2 failures; standalone automation takes about 20 minutes with retries #59377

Open

Description

@xuelang3hui

What version of the Codex App are you using (From “About Codex” dialog)?

26.1029.61003(从已安装应用 Info.plist 读取)。2026-11-04 受影响独立运行的内置引擎为 0.166.0-alpha.5.1;提交时内置引擎已为 0.166.0-alpha.6。尚未证明 alpha.6 可复现同一故障。

What subscription do you have?

ChatGPT 订阅登录,account/read 返回 planType=prolite;未使用自有 API key。

What platform is your computer?

Darwin 27.2.0 arm64 arm(uname -mprs)。macOS 27.2(26B123)。本地桌面任务;系统 HTTP/HTTPS/SOCKS 代理为 127.0.0.1:7897,Clash Verge Mod / Mihomo v1.19.26。

What issue are you seeing?

本地定时任务反复出现模型请求断流。旧长对话会在生成前的远程上下文压缩阶段失败;改为每次新建独立对话后,一次新任务仍耗时约 19 分 53 秒。请求排查重试、HTTP 回退、压缩恢复及错误诊断。

根因尚未确定:当前证据不能区分客户端、代理链路与服务端各自责任,不能直接认定为某项已修复缺陷的回归。

已核实日志(Asia/Shanghai,UTC+08:00)

2026-11-03,旧长对话:

16:03:16 remote compaction v2 stream failed; retries=1 max_retries=2; compact_error=stream disconnected before completion: IO error: Broken pipe (os error 32)
16:03:19 remote compaction v2 stream failed; retries=2 max_retries=2; compact_error=stream disconnected before completion: tls handshake eof
16:18:31 remote compaction v2 stream failed; compact_error=stream disconnected before completion: error sending request
16:22:42 remote compaction v2 stream failed; compact_error=Connection failed: error sending request

2026-11-04,新独立自动化:

10:04:43 turn started
10:09:51.542 image generation started
10:10:36.314 image generation finished (~44.8 s)
10:11:40 retry 1/5: stream disconnected before completion: IO error: Broken pipe (os error 32)
10:11:45 retry 2/5: IO error: Connection reset by peer (os error 54)
10:11:50 retry 3/5: tls handshake eof
10:12:21 retry 4/5: IO error: Connection reset by peer (os error 54)
10:13:50 retry 5/5: websocket closed by server before response.completed
10:13:56 codex_core::client: falling back to HTTP
10:24:36 turn completed (~1193 s total)

图片生成仅约 45 秒,生成后仍有约 14 分钟等待,期间出现连接失败及模型/工具交接的分钟级间隔;不能据此把全部等待归因于网络。此独立运行的图片后请求经 zstd 压缩约 1.77–1.80 MB,不能仅用旧聊天历史过大解释。

What steps can reproduce the bug?

这是间歇性故障,目前没有稳定的最小合成复现。已观察到的路径:

  1. 在 macOS 桌面应用中以 ChatGPT 登录,使用本地自动化,模型 gpt-6.1-sol,reasoning_effort=xhigh。
  2. 流程概述(不是原始逐字提示词):读取本地 JSON → 形成结构化结果 → imagegen 生成一张图 → 保存文件并更新 JSON → 输出结果。
  3. 在系统代理环境下,图片返回后继续模型/工具交接,出现 WebSocket 重连和 HTTP 回退;旧长对话还会在 remote compaction v2 阶段失败。

已尝试及归因边界

  • 用户确认约 2026-11-04 10:22 手动将 Clash 从直连切为规则模式。Clash 日志在 10:22:53 显示 mode=rule,随后请求恢复。代理/链路可能参与,但切换前后不是严格受控同输入实验,不能确认因果或排除服务端因素。
  • 恢复后,同一内置 CLI 的临时小请求对照:默认传输文本约 11 秒,HTTP 文本约 12 秒;同一约 1.65 MB PNG 输入,默认传输约 19 秒,HTTP 约 15 秒,均成功。这不支持全局禁用 WebSocket,也不证明长任务稳定性。
  • 任务改为独立对话、medium、减少重复读取并启用同日复用后,一次验证为 87.71 秒且未见连接错误。该次复用了已有图片,不能作为全新生成基准或网络根治证据。
  • 未关闭 TLS 校验,未修改全局模型提供商,未强制禁用 WebSocket。

What is the expected behavior?

暂时连接故障应在合理的总重试预算内恢复,或返回可执行的诊断信息。希望明确显示失败阶段、当前使用 WebSocket 还是 HTTP、是否已回退,以及应检查的代理条件。

请核查系统代理模式/路由变化后,连接池是否及时失效并重新建连;检查连续断流时的 HTTP 回退时机、压缩失败恢复,以及已完成工具结果的保留和安全续办。

Additional information

已通过官方 feedback/upload 提交,反馈关联 ID:no-active-thread-01a1a608-18a3-7ee1-b2f0-5bbf1de5e66f。

相关报告:#56387 、#57725 。尚不能确定是否同根因,请维护者按调查结果关联或合并。

本报告补充独立自动化耗时时间线、代理模式切换后恢复的关联,以及恢复后的文本/图片传输对照。仅公开诊断与脱敏错误摘录,未附完整聊天、业务数据、图片、配置、账号标识、凭据或本地用户路径。

Activity

  1. added
    app
    on Nov 4, 2026
  2. added
    bug
    connectivity
    context
    on Nov 4, 2026
  3. changed the title [-]macOS:模型请求反复断流、remote compaction v2 失败;独立自动化重试耗时约 20 分钟[/-] [+]macOS: Repeated model request stream disconnections and remote compaction v2 failures; standalone automation takes about 20 minutes with retries[/+] on Nov 4, 2026
  4. github-actions commented on Nov 4, 2026

    @github-actions
    Contributor

    English translation:

    What version of the Codex App are you using (From “About Codex” dialog)?

    26.1029.61003 (read from the installed application's Info.plist). The built-in engine used by the affected standalone run on 2026-11-04 was 0.166.0-alpha.5.1; at the time of submission, the built-in engine was already 0.166.0-alpha.6. The same failure has not yet been confirmed to reproduce on alpha.6.

    What subscription do you have?

    Signed in with a ChatGPT subscription; account/read returns planType=prolite. Not using my own API key.

    What platform is your computer?

    Darwin 27.2.0 arm64 arm (uname -mprs). macOS 27.2 (26B123). Local desktop tasks; the system HTTP/HTTPS/SOCKS proxy is 127.0.0.1:7897, using Clash Verge Mod / Mihomo v1.19.26.

    What issue are you seeing?

    Model request streams repeatedly disconnect during local scheduled tasks. Older, long conversations fail during remote context compaction before generation; after switching to a new, independent conversation for each run, one new task still took about 19 minutes and 53 seconds. Please investigate retries, HTTP fallback, compaction recovery, and error diagnostics.

    The root cause has not been determined: the current evidence cannot distinguish the respective roles of the client, proxy connection path, and server, and does not justify directly classifying this as a regression of a previously fixed defect.

    Verified logs (Asia/Shanghai, UTC+08:00)

    2026-11-03, older long conversation:

    16:03:16 remote compaction v2 stream failed; retries=1 max_retries=2; compact_error=stream disconnected before completion: IO error: Broken pipe (os error 32)
    16:03:19 remote compaction v2 stream failed; retries=2 max_retries=2; compact_error=stream disconnected before completion: tls handshake eof
    16:18:31 remote compaction v2 stream failed; compact_error=stream disconnected before completion: error sending request
    16:22:42 remote compaction v2 stream failed; compact_error=Connection failed: error sending request
    

    2026-11-04, new standalone automation:

    10:04:43 turn started
    10:09:51.542 image generation started
    10:10:36.314 image generation finished (~44.8 s)
    10:11:40 retry 1/5: stream disconnected before completion: IO error: Broken pipe (os error 32)
    10:11:45 retry 2/5: IO error: Connection reset by peer (os error 54)
    10:11:50 retry 3/5: tls handshake eof
    10:12:21 retry 4/5: IO error: Connection reset by peer (os error 54)
    10:13:50 retry 5/5: websocket closed by server before response.completed
    10:13:56 codex_core::client: falling back to HTTP
    10:24:36 turn completed (~1193 s total)
    

    Image generation took only about 45 seconds, but there was still about a 14-minute wait afterward, with connection failures and gaps of several minutes during model/tool handoffs. This does not establish that all the waiting was due to the network. The post-image request in this standalone run was about 1.77–1.80 MB after zstd compression, so an excessively large old chat history alone cannot explain it.

    What steps can reproduce the bug?

    This is an intermittent failure, and there is currently no reliable minimal synthetic reproduction. The observed sequence is:

    1. Sign in with ChatGPT in the macOS desktop app and use local automation with model gpt-6.1-sol and reasoning_effort=xhigh.
    2. Workflow overview (not the original verbatim prompt): read local JSON → produce structured results → generate one image with imagegen → save files and update JSON → output results.
    3. With a system proxy configured, continue model/tool handoffs after the image is returned; WebSocket reconnections and HTTP fallback occur. Older, long conversations also fail during remote compaction v2.

    What has been tried and limits on attribution

    • The user confirmed manually switching Clash from direct mode to rule mode at approximately 2026-11-04 10:22. Clash logs show mode=rule at 10:22:53, and requests subsequently recovered. The proxy/connection path may be involved, but the runs before and after the switch were not strictly controlled experiments with identical inputs, so causality cannot be confirmed and server-side factors cannot be ruled out.
    • After recovery, ad hoc small-request comparisons using the same built-in CLI succeeded: text took about 11 seconds with the default transport and about 12 seconds over HTTP; with the same approximately 1.65 MB PNG input, the default transport took about 19 seconds and HTTP about 15 seconds. This does not support globally disabling WebSocket, nor does it demonstrate stability for long-running tasks.
    • After switching the task to an independent conversation and medium, reducing repeated reads, and enabling same-day reuse, one validation run took 87.71 seconds with no observed connection errors. That run reused an existing image, so it cannot serve as a benchmark for fresh generation or evidence that the network issue has been permanently resolved.
    • TLS verification was not disabled, the global model provider was not changed, and WebSocket was not forcibly disabled.

    What is the expected behavior?

    Temporary connection failures should recover within a reasonable total retry budget, or return actionable diagnostic information. Please clearly show the failure stage, whether WebSocket or HTTP is currently in use, whether fallback has occurred, and which proxy conditions should be checked.

    Please verify whether the connection pool is promptly invalidated and connections are re-established after changes to the system proxy mode/routing; check the timing of HTTP fallback during repeated stream disconnections, recovery from compaction failures, and preservation of completed tool results with safe continuation.

    Additional information

    Submitted through the official feedback/upload channel, with feedback correlation ID: no-active-thread-01a1a608-18a3-7ee1-b2f0-5bbf1de5e66f.

    Related reports: #56387 , #57725 . It is not yet clear whether they share the same root cause; please link or merge them based on the investigation results.

    This report adds a timing breakdown for the standalone automation, the correlation between switching proxy modes and recovery, and text/image transport comparisons after recovery. Only diagnostics and sanitized error excerpts are disclosed; full chats, business data, images, configuration, account identifiers, credentials, and local user paths are not included.

  5. github-actions commented on Nov 4, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    appautomationsbugconnectivitycontextperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions