Skip to content

[Bug]: GLM (ACP) handoff to git worktree fails every time with "provider event stream closed unexpectedly"; continuation stalls until manual re-prompt #36209

Closed as duplicate

Description

@dmnyc

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. T3 Code desktop 0.1.5 on macOS, thread running GLM glm-5.3-flash via the ACP registry provider (acpRegistry_glm_agent, mode accept_edits), in a git project.
  2. Mid-turn, have the agent call t3_worktree_handoff with a continuationPrompt.

Happens on essentially every attempt. Local DB shows 7 of 10 GLM runs that invoked t3_worktree_handoff since 2026-11-09 recorded as failed this way (2 completed, 1 user-interrupted); all 3 attempts today failed:

Run Status Completed (UTC)
run:thread:1c096fca-…:ordinal:2 failed 2026-11-13T15:50:29.207Z
run:thread:a8ba36d6-…:ordinal:2 failed 2026-11-13T03:19:31.796Z
run:thread:84a50c11-…:ordinal:3 failed 2026-11-13T01:45:11.832Z
run:thread:0f94b07e-…:ordinal:1 failed 2026-11-11T12:39:55.312Z
run:thread:9a22bd0b-…:ordinal:1 failed 2026-11-10T22:03:34.803Z
run:thread:4a244cf3-…:ordinal:16 failed 2026-11-09T21:31:45.494Z
run:thread:7acfe52f-…:ordinal:2 failed 2026-11-09T21:37:19.880Z

Expected behavior

As fixed for Codex in #24545: the handoff turn ends cleanly and the worktree-continuation run starts on its own in the new worktree.

Actual behavior

The handoff tool call itself succeeds — worktree created, branch bound, success payload returned — but the handoff run is recorded failed with the "Provider error / The provider event stream closed unexpectedly" banner, and the queued continuation never starts on its own. The user must send a new message manually to continue in the worktree; that run then works fine.

Timeline from the 10:50 AM failure today (run:thread:1c096fca-2949-4add-8991-8ee321d47964:ordinal:2):

15:50:27.488Z  dynamic_tool t3-code.t3_worktree_handoff starts
               input: { baseRef: "upstream/main", branch: "feat/strip-tracking-params",
                        continuationPrompt: "Implement the adaptation of …" }
15:50:29.198Z  tool call completes successfully
               output.structuredContent: { worktreePath: "/Users/daniel/.t3/worktrees/zapcooking/feat-strip-tracking-params", … }
15:50:29.185Z  worktree-continuation run requested (ordinal 3, status queued)
15:50:29.207Z  handoff run (ordinal 2) marked **failed** — "The provider event stream closed
               unexpectedly" — 9 ms after the tool result
15:52:26.791Z  ordinal 3 finally starts, only after the user manually re-prompts
15:52:59Z+     assistant messages flow; work continues normally in the new worktree

Notes:

Impact

Major degradation or frequent failure

Version or commit

0.1.5 (desktop app and server)

Environment

macOS (Apple Silicon), T3 Code desktop/server 0.1.5, provider instance acpRegistry_glm_agent (GLM glm-5.3-flash over ACP), turn mode accept_edits, thought_level: max

Logs or stack traces

No stack trace available: the failure is not present in server.trace.ndjson (see note above). Evidence above is from orchestration_v2_projection_runs / orchestration_v2_projection_turn_items in ~/.t3/userdata/statev2.sqlite plus the UI banner screenshot.

Workaround

Re-prompt after the "Provider error" banner; the next run starts in the new worktree and behaves normally.

Activity

  1. juliusmarminge commented on Nov 13, 2026

    @juliusmarminge
    Member

    This is the same problem as #35274, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.

  2. dmnyc commented on Nov 13, 2026

    @dmnyc
    Author

    Thanks for the triage. It shares the root-cause family (mid-turn detach → ProviderAdapterEventStreamError: Workspace changed.), but two things are genuinely different from #35274:

    1. Different symptom — this is the Claude/Muse row, not the Grok row.
    #35274's headline failure is the hand-off run never settling: stays running forever, thread wedged, messages stuck queued. The GLM run does settle — it's recorded failed 9 ms after the tool result (15:50:29.198Z tool success → 15:50:29.207Z failed terminal), with the "provider event stream closed unexpectedly" banner. No hang, no wedge; a manual message works immediately.

    2. Uncovered path: continuationPrompt.
    Both #35274's repro and #22825's four-provider test matrix call t3_worktree_handoff with no continuationPrompt and verify with a manually sent follow-up message. This issue is the agent-initiated auto-continuation case, from statev2.sqlite:

    15:50:29.185Z  worktree-continuation run requested (ordinal 3, queued)
    15:50:29.207Z  handoff run settles as failed
    15:52:26.791Z  ordinal 3 starts — only after I sent a message manually
    

    So the queued continuation did not drain even though its blocking run reached a terminal state. That failure mode isn't exercised by #35274 or tested by #22825.

    Also: GLM glm-5.3-flash via acpRegistry_glm_agent (the ACP registry harness) isn't in any of the provider tables in #35274 or #22825, and this was on released 0.1.5, not a main build.

    If the consensus is same-root-cause, fine to keep this folded — but it'd be good to confirm #22825 (or its successor) fixes the GLM/ACP hand-off and that the worktree-continuation run starts on its own when continuationPrompt is set. Happy to retest on a build with that merged.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions