Skip to content

[Bug]: Native chat vs 2026.10.5 gateway: Enter/Ctrl+Enter dead, reply never renders, app freezes, orphaned ssh.exe holds tunnel port 18789 #1779

Open

Description

@itanyplus

Bug type

Client bug (Windows Hub native chat + SSH tunnel lifecycle)

Beta release blocker

No

Summary

Windows Hub v2026.9.8-1 (latest stable) native chat against a 2026.10.5 gateway (1b58cb9) over the built-in SSH tunnel is unusable, with a cascade failure:

  1. Composer keyboard shortcuts are dead — Enter and Ctrl+Enter do not submit; only clicking the send button works.
  2. Clicking send delivers the message (gateway-side chat.send triggers a full agent turn; model calls and the assistant reply are generated), but no reply ever renders in the Hub — the sent bubble stays gray indefinitely.
  3. Within ~1–4 minutes the entire app freezes and must be force-closed.
  4. After force-close, the Hub's tunnel ssh.exe survives as an orphan holding local port 18789; the next Hub start fails the tunnel with port-in-use. Get-NetTCPConnection -LocalPort 18789 reports an OwningProcess PID that tasklist cannot resolve (ghost socket) until the OS reclaims it.

Steps to reproduce

  1. Gateway: OpenClaw 2026.10.5 on Ubuntu (systemd user service, bind: loopback, auth.mode: token).
  2. Hub setup: SSH-tunnel connection type (key-based SSH auth to the gateway host), gateway token auth, device pairing approved via openclaw devices approve.
  3. Open a DM session in the Hub's native chat. Type a message. Try Enter / Ctrl+Enter (nothing happens). Click the send button.
  4. Observe: message reaches the gateway and the assistant turn completes (visible in gateway journal), but no reply appears; the bubble stays gray; the app freezes within minutes; force-close leaves ssh.exe holding 18789.

Expected behavior

  • Enter/Ctrl+Enter submit the composed message.
  • The assistant reply renders in the chat.
  • No app freeze; tunnel process is terminated with the app.

Actual behavior

See the four-point cascade above. Gateway-side journal evidence for step 2: the Hub's WebSocket connection polls sessions.list / sessions.preview successfully, chat.send starts the turn (model calls logged, reply generated), but zero reply/event deliveries reach the Hub connection in the same window.

Workaround that works: the gateway-served browser Control UI over the same tunnel renders the session and full bidirectional chat fine — suggesting the native client's event-stream consumption is what breaks, not the tunnel or the gateway.

Additional context

  • Client: OpenClaw Windows Tray cli v2026.9.8-1 (from the standalone releases page, latest stable as of 2026-10-20).
  • Gateway: OpenClaw 2026.10.5 (1b58cb9), Ubuntu, loopback bind.
  • Note: the stable channel (v2026.9.8-1, latest) currently has no build whose native chat works against a 2026.10.5 gateway — as reported here the feature is unusable, not degraded.
  • The SSH tunnel recovery path did not clean up the orphaned ssh.exe after the freeze.
  • Happy to provide journal excerpts or run controlled reproductions on request.

Activity

  1. added
    clawsweeper:intake:bug
    P0
    clawsweeper:fix-shape-clear
    clawsweeper:needs-maintainer-review
    clawsweeper:no-new-fix-pr
    impact:crash-loop
    impact:message-loss
    impact:ux-release-blocker
    issue-rating: 🦪 silver shellfish
    and removed
    clawsweeper:intake:bug
    on Oct 20, 2026
  2. clawsweeper commented on Oct 20, 2026

    @clawsweeper

    Codex review: this still needs some work.

    Summary
    Keep open narrowly for forced-exit tunnel cleanup: the reporter confirms restored chat and clean normal shutdown, but the original abrupt-termination case remains unverified and current SSH cleanup requires managed code to execute.

    Reproducibility: No current-main reproduction was run; the official-release report is specific, the reporter confirms improved normal operation, and abrupt-exit cleanup still needs an isolated Windows observation.

    Maintainer decision needed

    • Question: Does the reporter's successful deployment retest justify resolving the whole report, or must the original forced-termination tunnel case be verified separately?
    • Recommendation: Verify forced-exit cleanup: Use an isolated current Windows build, terminate only its owned parent, and verify SSH exit, listener release, and restart before resolving the remaining case.
    • Why: The reporter invites closure, but describes normal quitting; current source establishes managed cleanup without proving abrupt-exit cleanup, and repository policy requires certainty before automatic closure.

    Next step
    Verify current-build tunnel ownership, port release, and restart after abrupt parent termination, including visible recovery if restart remains blocked.

    Review details

    Best possible solution:

    The owned SSH tunnel should release port 18789 after abrupt app exit, with a visible recovery action if restart remains blocked.

    Do we have a high-confidence way to reproduce the issue?

    No current-main reproduction was run; the official-release report is specific, the reporter confirms improved normal operation, and abrupt-exit cleanup still needs an isolated Windows observation.

    Is this the best way to solve the issue?

    Verify the remaining process-lifetime boundary before changing code, preserving the released chat repairs and existing ownership checks.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The reporter's successful normal quit does not establish tunnel cleanup after abrupt parent termination.
    • The original unresolved listener PID was not proven to identify a surviving SSH process rather than residual socket state.
    • The successful retest also changed Gateway 2026.10.5 to 2026.11.4, so it does not isolate compatibility with the originally reported Gateway.

    Codex review notes: model internal, reasoning medium; reviewed against 8393459317d0.

    Label changes

    Label changes:

    • remove impact:crash-loop: Current review impact labels are impact:ux-release-blocker.
    • remove impact:message-loss: Current review impact labels are impact:ux-release-blocker.

    Label justifications:

    • P0: The remaining reported case blocks app restart and requires external process or port inspection; this preserves the reported recovery severity without claiming it reproduces on current main.
    • impact:ux-release-blocker: The reported retained tunnel prevents reconnecting after restart without an established in-product recovery path.
    Evidence reviewed

    Acceptance criteria:

    • ./build.ps1
    • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
    • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore
    • dotnet test ./tests/OpenClaw.Connection.Tests/OpenClaw.Connection.Tests.csproj --no-restore
    • On an isolated native Windows build, verify owned SSH exit, port 18789 release, and successful app restart after abrupt parent termination.

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed December 2, 2026, 5:03 AM ET / 10:03 UTC.

  3. willim-tuf commented on Oct 25, 2026

    @willim-tuf

    Additional user report (2026-10-25): keyboard submission is unusable in Windows Hub native Windows chat, not browser Control UI.

    The user explicitly reports that none of Enter, Shift+Enter, or Ctrl+Enter sends the composed chat message, and requested that this be reported upstream. Exact per-key effects (newline/no-op/caret movement) and mouse Send behavior have not yet been confirmed. This is a user observation, not a controlled reproduction by the reporting assistant.

    Current Windows Hub version, Windows build, keyboard layout/IME state, and connection mode are unknown. Please do not infer the version or the SSH/freeze symptoms from the parent report; those additional symptoms are not asserted by this report.

    Suggested reproduction/triage: open native chat, focus the composer, enter a short nonempty message, test Enter and Ctrl+Enter separately; also check Shift+Enter newline insertion and mouse Send independently. Verify with IME composition active and inactive if relevant.

    Expected: the advertised send shortcut submits once; Shift+Enter preserves a normal newline, and a discoverable mouse Send action works. Shift+Enter not sending is not itself considered a defect.

    Related: #1674 and closed #1766 document the OnKeyDown to OnPreviewKeyDown repair. This report does not establish a regression on a fix-containing version. Please clarify the currently supported stable build containing the repair and any version/reproduction details required to distinguish an older stable defect from a current regression.

  4. 168062576-tech commented on Oct 28, 2026

    @168062576-tech

    Root cause of "Enter / Ctrl+Enter do not submit" + verified fix

    Client: 2026.9.8-1 (file version 2026.9.8.0), Gateway 2026.10.6, managed local gateway (no SSH tunnel), native chat (UseLegacyWebChat=false).

    Reported behaviour: plain Enter inserts a newline (does not submit). Ctrl+Alt+Enter submits. The send button works.

    Code path: ReactorChatComposer.Render creates the composer as a Reactor TextBox with AcceptsReturn(true), then attaches its key handler via Microsoft.UI.Reactor.ElementExtensions.OnKeyDown(...), i.e. a bubbling KeyDown handler.

    <Render>b__19 (IL, decompiled body):

    // slash menu handling first (Tab/Enter/Up/Down/Esc) ...
    if (e.Key != VirtualKey.Enter) return;
    if (InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift) & Down) return; // Shift+Enter => newline
    e.Handled = true;
    Send();                        // Send() no-ops when !vm.CanSend

    Root cause: with AcceptsReturn(true) the TextBox class handler consumes Enter (inserts the newline) and marks the event handled before it bubbles, so the instance-level bubbling KeyDown handler never runs. Ctrl+Alt+Enter is not a text-editing chord, so the TextBox leaves it alone and the handler does receive it. Same mechanism explains Ctrl+Enter being dead.

    Fix (verified on 2026.9.8.0): attach the same handler to the tunnelling event instead of the bubbling one — ElementExtensions.OnPreviewKeyDown (same signature, Action<object, KeyRoutedEventArgs>) instead of OnKeyDown. No other change needed: the handler already ignores Shift+Enter, so Shift+Enter still inserts a newline and bare Enter now submits.

    Alternatively AddHandler(UIElement.KeyDownEvent, handler, handledEventsToo: true) should work equally.

    How I verified: applied the swap as a local IL patch to OpenClaw.Tray.WinUI.dll (2026.9.8.0), restarted, and pressed Enter in the composer — the message submits and the composer clears; Shift+Enter still produces a newline.

    Side note (may be a separate issue): in the same build, chat.send has a hard-coded 5 s response timeout (OpenClaw.Shared.OpenClawGatewayClient.SendChatMessageForRunAsync, TimeSpan.FromSeconds(5)). When the gateway takes longer to ack (e.g. openclaw status reports reachable 6.17s on this machine), the send is reported as "Timed out waiting for chat.send response from gateway" even though the message was delivered and the agent turn runs — and the draft is not cleared, so a retry can duplicate. Worth considering a longer timeout and/or clearing the draft on late ack.

  5. added
    clawsweeper:intake:bug
    and removed
    clawsweeper:fix-shape-clear
    clawsweeper:intake:bug
    on Nov 1, 2026
  6. itanyplus commented on Nov 3, 2026

    @itanyplus
    Author

    Following up on this — the thread now has everything needed for a fix:

    • @168062576-tech's root-cause analysis (Oct 28) pins the Enter-submission failure to the composer's bubbling KeyDown handler being pre-empted by the TextBox class handler (AcceptsReturn(true)), with a verified fix and the decompiled code path included.
    • @willim-tuf's Oct 25 report confirms keyboard submission is still broken for users on the stable channel, on top of the original render-freeze / ghost-tunnel symptoms.

    Current state for stable-channel users: native chat remains unusable against 2026.10.x gateways — the stable channel hasn't moved past v2026.9.8-1, while the alpha line has already reached v2026.10.8-alpha.20. Browser Control UI over the same tunnel works fine, so the gap is purely client-side.

    Is there anything we can add to help this land — e.g. validating the proposed fix against a specific alpha build, or testing a patched build if one becomes available? Happy to verify on a real 2026.10.8 gateway setup.

  7. added
    clawsweeper:intake:bug
    and removed
    clawsweeper:intake:bug
    on Nov 15, 2026
  8. itanyplus commented on Nov 17, 2026

    @itanyplus
    Author

    Resolved for us after the stable-line catch-up — verification note from the reporter.

    Environment: Windows Hub v2026.11.3 (stable channel; it resumed on Nov 7 with v2026.11.1 after six weeks stuck at 9.8-1), gateway 2026.11.4, native chat. Retested 2026-11-17.

    All four symptoms from the original report retested:

    1. Keyboard submission (Enter / Shift+Enter) — works. The multiline-composer Enter fix (PR fix(chat): make Enter send from the multiline composer #1674) shipped in v2026.11.1 and is verified live.
    2. Reply rendering — replies render correctly in native chat across multi-turn sessions (consistent with the streaming-reply cluster in 11.3: fix(chat): replies stack as repeated partial bubbles while a GPT model streams #2134 / fix(chat): completed replies stay busy after delayed updates #2100 / fix(chat): live reply preview stays on screen after the Gateway saves the reply #2174).
    3. App freezes — none across multiple conversation rounds plus a full app restart cycle.
    4. Orphan ssh.exe tunnels — clean lifecycle: after quitting the Hub, the background ssh.exe processes exit properly, no ghost port holds. (No specific PR identified for this one on our side; possibly a side effect of the general native-chat rework.)

    The six-week stable-channel gap (9.8-1 → 11.x) was the root of the "no usable stable build" framing in this report, and it is closed now. Consider this resolved on our deployment; feel free to close the issue, or keep it open for tracking if useful.

  9. removed
    impact:crash-loop
    impact:message-loss
    on Dec 2, 2026
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

    P0clawsweeper:needs-maintainer-reviewclawsweeper:no-new-fix-primpact:ux-release-blockerissue-rating: 🦪 silver shellfish

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions