Skip to content

[Bug]: Cannot close editor tabs associated with disconnected remote runtime (missing-worktree and openFiles ID mismatch) #23405

Closed as not planned

Description

@billythekidz

Summary

SVG editor tabs in the poker-aio worktree reopened after being closed. The behavior stopped when I disconnected the Orca clients connected to the Orca server, then closed the SVG tabs.

Investigation

I initially suspected a failure to close tabs when a remote worktree is disconnected (missing-worktree), and an ID/path mismatch between unified tabs and openFiles. These were hypotheses based on code and persisted-state inspection; neither has been confirmed as the cause of this incident.

Editing the local SQLite and JSON profile state did not resolve the issue. After disconnecting all Orca clients connected to the Orca server, I closed the SVG tabs; this time they stayed closed.

The observed sequence that worked:

  1. Disconnect the Orca clients connected to the Orca server.
  2. Close the SVG tabs.
  3. The tabs stay closed instead of reopening.

This suggests a possible client/server state-sync conflict when closing tabs. The specific mechanism is unknown; this is not a confirmed root cause. The incident was also not explained simply by disconnecting the remote worktree.

Previous observations

  • On 2026-09-28, attempted tab-close actions did not reduce the observed SVG tab count. UI snapshots and profile counts were inconsistent, and some UI actions were reported as unverified. Those attempts do not establish that Orca accepted a close request.
  • Editing local SQLite/JSON state did not fix the issue. Profile counts after that cleanup do not represent the live state after the successful workaround.
  • I did not capture live tab counts after the successful close or the tahoe and orca-linux connection status at the time.

Expected behavior

Closing an editor tab should take effect and remain closed across Orca client/server state synchronization. Users should not have to disconnect every client as a workaround.

Follow-up investigation

  • Identify which client/server writes or restores the tabs after a close action.
  • Correlate tab-close events with client/server state synchronization and hydration.
  • Reproduce with live unifiedTabs and openFilesByWorktree counts scoped to the affected worktree, and record each client's connection state during failure and success.

Current conclusion: Disconnecting clients and then closing the tabs is an observed workaround. A client/server conflict is a hypothesis, not a verified root cause.

Activity

  1. AmethystLiang commented on Sep 27, 2026

    @AmethystLiang
    Contributor

    thanks for reporting. looking into it

  2. billythekidz commented on Sep 28, 2026

    @billythekidz
    Author

    Superseded — see current issue description

    This comment records an earlier snapshot. Its counts are retained as historical observations, but I have not re-verified the source artifacts. Do not treat them as authoritative current counts or proof that Orca accepted a tab-close action. See the current issue description for the latest investigation and observed workaround: #23405


    Update — 2026-09-28

    I rechecked this against the local poker-aio develop worktree. Both paired remotes (tahoe and orca-linux) reported connected during the check. Therefore, I could not reproduce the issue with a disconnected host, and the original missing-worktree explanation is not confirmed for this case.

    The tabs still did not clear after an attempted close. At one observation, the UI showed 51 SVG editor tabs while local workspaceSession held 49 SVG entries in unifiedTabs and 146 SVG records in openFilesByWorktree (revision 2313). Earlier reads showed different totals, consistent with duplicate/stale records changing during the session. A CmdOrCtrl+W attempt also left the SVG tab count and saved record counts unchanged on the subsequent check.

    This points to a local editor-tab/workspace-session persistence or state-consistency problem while remotes are online; root cause remains unproven. I did not stop either remote or edit the SQLite profile directly. Orca CLI help exposes browser-tab close, but no editor-file/tab close command.

    Please treat the disconnect-specific repro and missing-worktree cause above as unverified for this instance. Further diagnosis needs a reliable close action and tracing whether it removes the corresponding editor entry from local workspaceSession before hydration.

  3. billythekidz commented on Sep 28, 2026

    @billythekidz
    Author

    Superseded — see current issue description

    This comment records an earlier snapshot. Its counts are retained as historical observations, but I have not re-verified the source artifacts. Do not treat them as authoritative current counts or proof that Orca accepted a tab-close action. See the current issue description for the latest investigation and observed workaround: #23405


    Correction: connected-host reproduction — 2026-09-28

    The Remote Hosts screenshot and orca status both show orca-linux and tahoe as Connected. Neither host was observed disconnected. My previous wording referred to the disconnected-host scenario described in the issue, not the state of these hosts during my test; it did not establish that missing-worktree occurred here.

    The test was on worktree dabb0c76-0edf-48b7-8119-e16608c392b3::/Users/theaux/Documents/GitHub/poker-aio, branch develop. At the checked snapshot, UI showed 51 SVG tabs; local workspaceSession revision 2288 contained 51 SVG unifiedTabs entries and 150 SVG openFilesByWorktree records. I attempted the meu_3.svg tab interaction and CmdOrCtrl+W; after waiting, those counts remained unchanged. The computer-use actions were reported as synthetic/unverified, so this is evidence that the attempted interaction did not change observed state—not proof that Orca accepted a close request.

    This connected-host test does not reproduce the reported disconnected-host condition. It also does not establish a separate root cause. The closeFile ID/path mismatch and accumulated duplicate saved entries remain hypotheses to verify against a reliably accepted close action. No profile database rows were edited.

  4. billythekidz commented on Sep 29, 2026

    @billythekidz
    Author

    Update — 2026-09-29: tabs close after disconnecting Orca clients

    I found a reliable way to close the SVG tabs that kept reopening. I disconnected all Orca clients connected to the Orca server, then closed the SVG tabs; after the clients were disconnected, the tabs stayed closed.

    This changes the diagnosis: the failure was not explained by disconnecting the remote worktree itself. The behavior points to a conflict or state-sync interaction between connected Orca clients and the server: while clients were connected, closing tabs caused them to reopen; after disconnecting those clients, closing the tabs succeeded. I have not isolated the specific client/server mechanism, so this is an observed trigger/workaround, not a confirmed code-level root cause.

    Editing local SQLite/JSON profile state did not resolve the issue. The effective workaround was disconnecting the connected Orca clients, then closing the SVG tabs.

  5. OrcaWin commented on Oct 9, 2026

    @OrcaWin
    Collaborator

    Duplicate of #23967. Your workaround (disconnecting the paired clients, then closing the tabs) matches what we found there: connected peers were republishing the editor tabs they only mirrored, so a closed tab came straight back. The fix is in progress in #25877. If you see something different from that once it lands, please reopen with details.

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

Metadata

Metadata

Assignees

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