You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: On Linux/Wayland, Ctrl+V keeps pasting T3's last Copy-button copy and ignores newer copies from other apps #31189
On Linux with native Wayland, after you use any T3 Code Copy action, Ctrl+V in T3 keeps pasting that same copied text. A later copy from another app is ignored, and this lasts until T3 restarts.
Copies made with Ctrl+C inside T3 are not affected. Only copies made through T3's Copy actions trigger it.
Cause
T3's Copy actions write the clipboard from the main process: ElectronShell.copyText calls electron.clipboard.writeText (apps/desktop/dist-electron/main.cjs). On native Wayland, if an Electron app writes the clipboard this way, the app's later clipboard reads return its own write and not the system clipboard. This is upstream Electron bug electron/electron#54645, which others have reproduced on Electron 43, 44.5.1 and 45.
Reproduction
Environment: T3 Code 0.1.8-nightly.20261104.4179, Electron 44.10.1, Chromium 152.0.7977.169, Hyprland 0.55.2, native Wayland. I ran T3's own Electron binary with a test app and a focused window:
case
system clipboard (wl-paste)
Ctrl+V into the app
the app has not written the clipboard
B
B ✅
the app wrote A with clipboard.writeText in the main process
B
A ❌
the user pressed Ctrl+C inside the app on A, then another app copied B
B
B ✅
The bad case in T3:
Click a Copy action in T3.
Copy different text in another app, or with wl-copy.
Press Ctrl+V in the T3 composer. The text from step 1 appears.
This also breaks dictation and other tools that paste text with a synthetic Ctrl+V.
Possible fix (not tested in T3)
Write the clipboard in the renderer during the click, for example with navigator.clipboard.writeText from the click handler, the same way an in-page Ctrl+C writes it. Our test showed that the in-page copy does not cause the problem. Another option is to call electron.clipboard.writeText from main only when the app is not running on native Wayland.
We couldn't reproduce this in T3 Code itself on main (a21d788, Electron 44.10.1). T3 ran as a native Wayland client under a wlroots compositor (sway 1.9) with real pointer and keyboard input:
T3 copy action
then
Ctrl+V in T3 pasted
Settings › About › Copy version (renderer navigator.clipboard)
wl-copy other text
the newer text ✅
Right-click a link › Copy Link (main-process clipboard.writeText, the ElectronShell.copyText path)
wl-copy other text
the newer text ✅
Both of the above
copy in another app's window, click back into T3
the newer text ✅
In a small test app on the same Electron binary, we only got the stuck state when the main process wrote the clipboard before the app had received any click or key press (this matches the repro in #54645). Chromium sends wl_data_device.set_selection only when it has an input serial. Once the window has had a click or key press, renderer and main-process writes take the same path and both reached the compositor. We also checked Hyprland's set_selection handler: it doesn't validate the serial, so a click on a Copy button should be enough there too.
Could you help us close the gap?
Which T3 Copy action triggers it for you (for example, the Copy button on a message, a code block, or the Copy Link context-menu item)? Does it still happen if you click inside the T3 window first and then use that Copy action?
A Wayland protocol log from T3 itself: start T3 with WAYLAND_DEBUG=client set, do steps 1–3 with harmless text, and attach the lines around the Copy click that mention set_selection, wl_data_source or cancelled.
How you launch T3 (--ozone-platform=wayland, ELECTRON_OZONE_PLATFORM_HINT, or other flags), and whether you use an input method (fcitx5, ibus), a pen tablet, or a touchscreen.
Can't reproduce this on KDE Plasma 6.8.2 Wayland (T3 0.1.9-nightly.20261110.4452, Electron 44.10.1, native Wayland, no launch flags). After both a message Copy button and the native right-click › Copy Link (the main-process ElectronShell.copyText path), a later wl-copy was what Ctrl+V pasted in T3. That matches Julius's sway result.
@kevinhsykes Which T3 Copy action triggers it (for example a message's Copy button, a code block, or right-click › Copy Link), and could you start T3 with WAYLAND_DEBUG=client, reproduce once with harmless text, and attach the log lines around the Copy click that mention set_selection, wl_data_source or cancelled, along with your launch flags and any input method (fcitx5, ibus), pen tablet or touchscreen?
Activity
juliusmarminge commentedon Nov 4, 2026
Thanks for the detailed write-up and the link to electron/electron#54645.
We couldn't reproduce this in T3 Code itself on
main(a21d788, Electron 44.10.1). T3 ran as a native Wayland client under a wlroots compositor (sway 1.9) with real pointer and keyboard input:navigator.clipboard)wl-copyother textclipboard.writeText, theElectronShell.copyTextpath)wl-copyother textIn a small test app on the same Electron binary, we only got the stuck state when the main process wrote the clipboard before the app had received any click or key press (this matches the repro in #54645). Chromium sends
wl_data_device.set_selectiononly when it has an input serial. Once the window has had a click or key press, renderer and main-process writes take the same path and both reached the compositor. We also checked Hyprland'sset_selectionhandler: it doesn't validate the serial, so a click on a Copy button should be enough there too.Could you help us close the gap?
WAYLAND_DEBUG=clientset, do steps 1–3 with harmless text, and attach the lines around the Copy click that mentionset_selection,wl_data_sourceorcancelled.--ozone-platform=wayland,ELECTRON_OZONE_PLATFORM_HINT, or other flags), and whether you use an input method (fcitx5, ibus), a pen tablet, or a touchscreen.0xKa commentedon Nov 10, 2026
Can't reproduce this on KDE Plasma 6.8.2 Wayland (T3 0.1.9-nightly.20261110.4452, Electron 44.10.1, native Wayland, no launch flags). After both a message Copy button and the native right-click › Copy Link (the main-process
ElectronShell.copyTextpath), a laterwl-copywas what Ctrl+V pasted in T3. That matches Julius's sway result.juliusmarminge commentedon Nov 12, 2026
@kevinhsykes Which T3 Copy action triggers it (for example a message's Copy button, a code block, or right-click › Copy Link), and could you start T3 with WAYLAND_DEBUG=client, reproduce once with harmless text, and attach the log lines around the Copy click that mention set_selection, wl_data_source or cancelled, along with your launch flags and any input method (fcitx5, ibus), pen tablet or touchscreen?