Skip to content

Desktop app crashes with React removeChild NotFoundError after settling a thread from a disconnected environment #35275

Closed as not planned

Description

@samuelscheit

What happened

In the desktop app, I tried to settle a thread on a remote Windows machine that was no longer connected. I clicked Settle on the thread's sidebar row. A " is not connected" error toast appeared. About two seconds later the app showed its crash screen:

NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

At that point the route had changed to a thread on the local Mac environment. I'm not sure whether I clicked that thread or the app moved to it on its own.

Diagnosis

The renderer's telemetry, relayed to the local server's trace, shows this sequence:

  1. 13:31:06.291Z: EnvironmentCommands.settleThread against the remote environment fails right away on the client with EnvironmentRpcUnavailableError: <windows-pc> is not connected. (from EnvironmentRpc.currentSession). No RPC is sent.
  2. 13:31:08.652Z: React throws removeChild … not a child of this node while rendering /<local-mac-env>/<local-thread>.
  3. 13:31:08.71Z: the client dispatches thread.visit for that local thread.

Settle is optimistic:

  • packages/client-runtime/src/state/threadLifecycle.ts:84 pushes a pending update, so the row moves to Settled.
  • command.run fails at once, so the finally at threadLifecycle.ts:103 removes the update again in the same turn. The row moves back.
  • useThreadActions.ts:807-812 returns the failure, and the error toast appears.

The likely cause is this settle-then-unsettle flip for a thread whose environment is offline. It seems to leave the sidebar or thread-view DOM out of sync with React, and the next commit (the thread navigation) fails while removing a node. The minified stack is all React internals, so the exact component is unconfirmed. Not an extension or translator: this is the Electron app.

No commits up to v0.1.10-nightly.20261112.4580 touch threadLifecycle.ts/threadCommands.ts (useThreadActions.ts only got #25901), so it is likely still present.

Steps to reproduce

  1. Pair the desktop app (macOS) with a second machine (here Windows) so that its threads show in the sidebar.
  2. Disconnect the second machine: shut it down or quit T3 Code on it.
  3. In the desktop sidebar, click Settle on one of the disconnected machine's threads.
  4. The " is not connected." toast appears.
  5. Within a few seconds, open a thread on the local environment (or let the app navigate there). The app crashes with NotFoundError: removeChild.

Seen once. The repro hasn't been confirmed to be deterministic.

Version

Desktop app T3 Code (Nightly) 0.1.8-nightly.20261109.4433 (local server is the same version). The triage CLI was 0.1.1.

Environment

macOS 27.0.0 arm64 (Mac Studio), Electron 44.10.1 / Chrome 152, Node v26.8.2. Desktop app on the Mac with a local server, controlling a remote Windows PC that was offline at the time.

Evidence

# Crash screen
T3 Code (Nightly) 0.1.8-nightly.20261109.4433
Path: /a205341c-9e41-4681-9f30-96508d2d9fe5/926f8c50-dea7-4a10-b9bf-aa642502dec0
Time: 2026-11-12T13:31:08.652Z
NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at Tu (t3code://app/assets/dist-tf9xh-1L.js:34:107435)
    at wu (t3code://app/assets/dist-tf9xh-1L.js:34:106788)
    ... (Tu/Au/Mu frames in dist-tf9xh-1L.js repeating)

# server.trace.ndjson (t3code-web otlp spans), 2.36s before
13:31:06.291Z EnvironmentCommands.settleThread  status=error "<windows-pc> is not connected."
  exception.type: EnvironmentRpcUnavailableError
  at EnvironmentRpc.currentSession (t3code://app/assets/utils-bhlxsjYb.js:31:34957)
  at EnvironmentCommands.settleThread (t3code://app/assets/utils-bhlxsjYb.js:31:43091)
13:31:08.71Z  orchestration.dispatchCommand thread.visit thread_id=926f8c50-… (local env)

Related issues

#24532, #24563: settle fails for offline-environment threads. This issue is the renderer crash after that failure, not the failure itself.

Fix applied or workaround

Nothing changed on the machine. Recover with Cmd+R or an app restart; avoid settling threads of a disconnected environment.

Filed by

Claude Code (claude-opus-5-5) via t3 triage

Activity

  1. juliusmarminge commented on Nov 12, 2026

    @juliusmarminge
    Member

    @samuelscheit Can you make it happen again, and if so, what exactly was on screen when you clicked Settle (which thread was open in the main pane, whether any other toast, menu or dialog was showing), and did the crash follow your own click on the local thread?

  2. juliusmarminge commented on Nov 19, 2026

    @juliusmarminge
    Member

    Closing: no reply in 7 days after we asked for more information. Comment with the missing details and we will reopen.

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

    needs more infoInitial triage showed no bug. Awaiting more infovia-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions