Repository navigation
Description
What happened
Dragging a tab out into its own window permanently breaks the terminal wakeup channel for that session. From the moment the drag starts, the PTY event loop keeps producing output but can no longer wake its receiver, and Warp begins logging Failed to send Wakeup event: Closed(..) on the hot PTY read path.
The user-visible symptoms after the drag-out:
- Typed characters lag behind keystrokes
- Pasted images take about a second to appear
- Noticeably increased CPU and machine heat
None of this was happening before the drag. The tab in question was running Claude Code on an active task, so the PTY was producing output continuously, which appears to make the problem much more pronounced.
Expected behavior
Dragging a tab into a new window should be a transfer of ownership. The session's wakeup channel should be rewired to the new window's receiver, and rendering/input latency should be unchanged.
Steps to reproduce
- Start a long-running, output-heavy process in a tab. I used Claude Code working through a task;
yesor a verbose build would likely work too. - While it is actively streaming output, drag that tab out of the window and drop it to create a new window.
- Type into the new window, or paste an image.
- Observe input lag and elevated CPU. Watch the log for
Failed to send Wakeup event: Closed(..).
Evidence from logs
The failures begin in the exact same second as the drag, and continue afterward. Condensed timeline:
02:01:44Z [INFO] [warpui_core::core::app] dispatching typed action: warp::workspace::action::WorkspaceAction::StartTabDrag
02:01:44Z [INFO] [warpui::platform::mac::window] Opening window with id 2
02:01:44Z [INFO] [warpui::platform::mac::window] Using discrete GPU for rendering new window.
02:01:44Z [INFO] [warp::terminal::local_tty::terminal_manager] Creating terminal model with 0 restored blocks
02:01:44Z [INFO] [warp::workspace::cross_window_tab_drag] tab_drag: begin_multi_tab_drag source_wid=0 preview_wid=2 source_tab_index=15
02:01:44Z [INFO] [warp::terminal::local_tty::unix] Starting shell /bin/zsh
02:01:44Z [INFO] [warp::terminal::local_tty::unix] Successfully spawned child zsh process with pid 81140
02:01:44Z [WARN] [warp::terminal::event_listener] Failed to send Wakeup event: Closed(..) <-- starts here
02:01:45Z [INFO] [warp::workspace::cross_window_tab_drag] tab_drag: on_drop ENTER phase=Floating has_dedicated_preview=true drop_resolution_attempted_before=false
02:01:45Z [INFO] [warp::workspace::cross_window_tab_drag] tab_drag: finalize branch=Floating+dedicated_preview -> finalize_preview_as_new_window (CREATES NEW WINDOW) source_wid=0 preview_wid=2
The drag itself finalized cleanly via finalize_preview_as_new_window, so this is not a failed or aborted drag.
Volume: 1,315 Failed to send Wakeup event: Closed(..) warnings between 02:01:44Z and 02:06:43Z. Zero occurrences anywhere earlier in the log. The rate is bursty and correlates with terminal output, peaking around 50 per second:
50 2026-07-28T02:01:57Z
46 2026-07-28T02:01:54Z
39 2026-07-28T02:02:06Z
39 2026-07-28T02:01:55Z
36 2026-07-28T02:01:58Z
Likely cause
ChannelEventListener::send_wakeup_event in app/src/terminal/event_listener.rs:40-44:
pub fn send_wakeup_event(&self) {
if let Err(e) = self.wakeups_tx.try_send(()) {
log::warn!("Failed to send Wakeup event: {e:?}");
}
}Closed(..) means the receiving half of wakeups_tx was dropped. Per the comment on the struct, this channel exists specifically so the throttled receiver can coalesce wakeups during high-throughput output. Two consequences follow, and I believe they map directly onto the two reported symptoms:
- Lag: with the wakeup receiver gone, nothing is driving the coalesced render/wake path for that terminal anymore, so output and input echo only get painted incidentally.
- CPU and heat: this is an unthrottled
log::warn!on the per-PTY-read hot path. With an agent streaming output, that is tens of formatted log lines and disk writes per second, on top of an event loop still parsing ANSI for a model whose consumer is gone.
The teardown of the drag preview window (wid 2) looks like the point where the receiver is dropped without the surviving session's sender being rewired.
Secondary observations
These came out of the same investigation and may or may not be related. Flagging them rather than asserting they are bugs:
- Drag preview spawns a real shell.
begin_multi_tab_dragcreates a terminal model and spawns an actual/bin/zsh(pid 81140) purely for the drag preview. A second one was spawned earlier in the same interaction (pid 80690). If these are throwaway, spawning real shells per drag is expensive. Using discrete GPU for rendering new windowon Apple Silicon. This machine is an M4 Pro with no discrete GPU, so this code path looks vestigial or misreported on ARM Macs.- 23 live
PTY readerthreads in the CPU sample. Most are correctly parked inkevent, so they are not the CPU hog, but the count seems high.
What I could not confirm
- Whether the memory footprint is related. The sample shows a 4.3 GB physical footprint with a 5.1 GB peak, but this instance had been running for 7 days, so I would not attribute that to the drag.
- The main thread was idle in
nextEventMatchingMaskduring the sample, and no single thread showed a runaway spin. CPU was bursty (measured 32.5%, 20.7%, 6.7% across three consecutive samples) rather than pinned, which is consistent with output-correlated log spam rather than a tight infinite loop.
Environment
- Warp version:
v0.2026.07.11.08.41.00(WarpDev / internal development build) - macOS 26.5.2 (25F84), Apple M4 Pro, ARM64
- Process uptime at time of capture: launched 2026-07-20, so about 7 days
Attachments
Log excerpt and CPU sample are zipped at ~/Desktop/warp-tab-drag-perf.zip, containing:
timeline.log- filtered drag and wakeup eventswarp_dev-drag-window.log- full log for the affected windowwarpdev-cpu-sample.txt-sample(1)output captured while the issue was occurring
Activity
warp-for-oss commentedon Jul 28, 2026
@bholmesdev
Here's what I found while triaging this issue:
Thanks for the detailed logs — this looks actionable and distinct from existing tab-drag/CPU reports. The timing points to the tab detach/new-window transfer breaking the terminal redraw wakeup path, with output-heavy commands amplifying the lag and CPU/log churn.
I have a few follow-up questions before I can narrow this down:
yesreproduces the same lag after dragging the tab into a new window?Reply in-thread with those details and the triage workflow will automatically re-evaluate the issue and update the diagnosis, labels, and next steps.
Maintainer details
I concluded that dragging a running, output-heavy tab into a new window appears to leave the PTY event loop with a closed terminal wakeup receiver, causing redraw/input lag and hot-path wakeup warning spam..
Triage summary
This looks like a real cross-window tab-drag regression rather than a generic Claude Code or high-output performance report. The report provides concrete steps and a timestamped log sequence showing tab drag start, preview/new-window creation, then repeated
Failed to send Wakeup event: Closed(..)warnings with no earlier occurrences.Reproduction assessment
Reproducibility is high from the report: the trigger is specific (drag an actively outputting tab into a new window), the environment is identified, and the wakeup failures are tightly correlated with the drag lifecycle. Confirmation on a fresh/current build and with a simple output-heavy command would still help separate the core tab-transfer bug from long-running session or Claude Code-specific amplification.
Likely root cause
ChannelEventListener::send_wakeup_eventsends terminal redraw wakeups intowakeups_tx; the receiver is consumed byTerminalView::newthrough a throttled stream that callshandle_terminal_wakeup. The local PTY event loop callssend_wakeup_eventafter processing PTY bytes, so aClosed(..)result means the event-loop/model side is still alive while the receiver side has been dropped.The relevant drag path creates a dedicated preview window for multi-tab drags, transfers the live pane-group/view tree into that window, and then promotes the preview to a permanent window on a floating drop. The most plausible root cause is that this transfer/promotion/source-cleanup lifecycle drops or detaches the
TerminalViewwakeup receiver while leaving the terminal model and PTY event loop sender alive. Under continuous output, that would both prevent normal coalesced redraw wakeups and emit warning logs on the PTY read hot path.Relevant files inspected:
app/src/workspace/cross_window_tab_drag.rsapp/src/workspace/view.rsapp/src/root_view.rsapp/src/terminal/event_listener.rsapp/src/terminal/local_tty/event_loop.rsapp/src/terminal/local_tty/terminal_manager.rsapp/src/terminal/view.rscrates/warpui_core/src/core/app.rsDuplicate check
I searched all open issues and recent closed issues. I found related tab-drag and performance reports, but not two matching duplicates for this specific wakeup-channel failure. #14346 is related to cross-window tab dragging, but its failure mode is wrong-tab removal when the source tab list changes mid-drag, not a closed terminal wakeup receiver after creating a new window.
Question reasoning
yesreproduces the same lag after dragging the tab into a new window? — This isolates the tab-transfer bug from the 7-day process uptime and Claude Code-specific output pattern, and would further raise confidence in the minimal repro.This is my automated analysis and may be incorrect. A maintainer will verify the details.
Powered by Oz
bholmesdev commentedon Jul 28, 2026
System logs at the time of failure:
warp-for-oss commentedon Jul 28, 2026
@bholmesdev
Here's what I found while triaging this issue:
Thanks for the detailed logs and reproduction steps. This looks actionable without more reporter info: the wakeup failures begin during cross-window tab drag and are likely amplified by output-heavy terminal activity, which matches the lag and CPU symptoms.
Maintainer details
I concluded that dragging an output-heavy terminal tab into a new window appears to break or orphan the terminal wakeup path during cross-window tab-drag preview/adoption, causing repeated wakeup-send failures, input/render lag, and CPU overhead..
Triage summary
This is an actionable high-repro bug in the cross-window tab-drag path for live terminal sessions. The report's log timeline shows
Failed to send Wakeup event: Closed(..)starting at the same timestamp asStartTabDrag/ preview-window creation and continuing during output-heavy PTY activity, which matches the reported input/render lag and CPU overhead.Code-path notes
app/src/terminal/event_listener.rslogs every failedwakeups_tx.try_send(())inChannelEventListener::send_wakeup_event; a closed receiver on this path can become log spam under PTY output.app/src/terminal/local_tty/event_loop.rscallssend_wakeup_event()after processing PTY bytes, so output-heavy commands or agents amplify the failure rate.app/src/terminal/local_tty/terminal_manager.rscreates thewakeups_tx/wakeups_rxpair, passes the sender into the terminal model/event loop, and passes the receiver into the terminal surface.app/src/terminal/view.rsconsumes the receiver via a throttledspawn_stream_local(..., Self::handle_terminal_wakeup, ...), so dropping or orphaning that stream/receiver would produce the observedClosedsend errors.app/src/root_view.rsandapp/src/workspace/view.rsshow that multi-tab cross-window drag creates a transferred preview window usingNewWorkspaceSource::TransferredTab; that source currently callsadd_tab_with_pane_layout(Default::default()), creating a real placeholder terminal beforeadopt_transferred_pane_groupswaps in the dragged pane group.Workspace::adopt_transferred_pane_groupdetaches the placeholder pane group viadetach_panes_for_close, which currently goes throughdetach_panes/DetachType::HiddenForClose; local TTY manager cleanup is primarily tied to manager drop, whileon_view_detachedonly handles shared-session lifecycle. That makes a receiver-dropped / sender-still-live race plausible for the throwaway preview placeholder.crates/warpui_core/src/core/app.rsdocuments thattransfer_view_tree_to_windowshould preserve subscriptions via dynamic window lookup, so the likely first investigation target is the preview placeholder/adoption lifecycle, with transferred-view wakeup-stream ownership as a secondary check.Duplicate search
I checked all open non-PR issues via the GitHub API and also recent closed issues from the last 7 days. Closest related issues include #14346 (different cross-window tab-drag corruption), #13975 (PTY reader lifecycle/leak), #9119 (dragging a window causing disk I/O lag), and #10626 (CPU/input lag in a VM), but none match both the tab-drag-to-new-window wakeup-channel failure and the output-correlated
Closed(..)log spam. Fewer than two likely duplicates were found, so this should not be marked duplicate.Remaining ambiguity
No reporter follow-up is required for initial routing. The main unresolved engineering question is whether the closed receiver belongs to the transferred live terminal or to the preview placeholder terminal; the extra shell spawned for the preview and the placeholder detach path make the latter a strong candidate.
This is my automated analysis and may be incorrect. A maintainer will verify the details.
Powered by Oz
bholmesdev commentedon Jul 28, 2026
Confirmed on Warp Stable
I made this problem occur again on Warp Stable
v0.2026.07.22.09.01.01. The behavior is the same as the development build in the initial report.Only a drag that creates a window causes the failures
The stable log contains two drags. The two drags are 3 seconds apart. Only the second drag causes the failures.
The first drag moved the tab in the same window. It did not create a window. It caused no failures.
The second drag created a new window. It caused failures in the same second.
This shows that the cause is in the
finalize_preview_as_new_windowpath. A drag inside one window is safe.Quantity of failures
There were 991 failures at the time of the capture. The quantity continued to increase. The rate was 17 failures in 6 seconds.
The maximum rate was 48 failures in one second. The development build showed 50 failures in one second. The two builds are equivalent.
Two corrections to the initial report
1. The discrete GPU message is not related to the drag.
The stable log shows the message
Using discrete GPU for rendering new windowfor window id 0 at start. The message occurs for each new window. Do not use this message as evidence for this problem.2. The CPU load did not increase on the stable build.
The stable process stayed near 0 percent. The failures continued at the same time.
This result agrees with the log spam theory. The cost increases with the quantity of PTY output. My development session had an agent that made much output. My stable session had an idle shell.
The stable log therefore confirms the mechanism. It does not confirm the performance effect. To measure the performance effect, run an agent or a command that makes much output before you drag the tab.
Log file
The stable log
warp.logis attached. The relevant period is15:46:47Zto15:47:40Z.warp-for-oss commentedon Jul 28, 2026
@bholmesdev
Here's what I found while triaging this issue:
Confirmed on Stable and narrowed to dragging a tab from a multi-tab window out into a new window; same-window tab dragging is not implicated. The current code path creates a temporary preview window with a placeholder terminal before adopting the moved tab, so this looks actionable in the tab-transfer/preview-window lifecycle.
Maintainer details
I concluded that dragging a tab from a multi-tab window into a new window reproducibly causes wakeup-channel failures on the preview/new-window transfer path, with performance impact when the affected PTY is output-heavy..
Triage summary
The trusted follow-up confirms this on Stable and narrows the trigger to the multi-tab drag path that creates a new window. A same-window tab drag did not produce wakeup failures, while the
begin_multi_tab_drag/finalize_preview_as_new_windowpath did.Reproduction assessment
Reproducibility is high: the issue has exact steps, timestamp-correlated logs, and confirmation on both the original development build and Stable
v0.2026.07.22.09.01.01. The performance/CPU impact appears proportional to PTY output volume, so an idle shell may reproduce the wakeup failures without reproducing high CPU.Likely technical cause
The code supports a likely failure mode in the dedicated preview-window path rather than a generic terminal input issue:
app/src/workspace/view.rsstarts cross-window handling fromWorkspace::on_tab_drag; for multi-tab sources it callscreate_transferred_window(...)and thenCrossWindowTabDrag::begin_multi_tab_drag.app/src/root_view.rscreates the preview viaNewWorkspaceSource::TransferredTab, transfers the real pane group withctx.transfer_view_tree_to_window(...), then callsWorkspace::adopt_transferred_pane_group.Workspace::configurehandlesNewWorkspaceSource::TransferredTabby first callingadd_tab_with_pane_layout(Default::default(), ...), which creates a placeholder/default terminal before the real pane group is adopted.Workspace::adopt_transferred_pane_groupswaps the real pane group into the placeholder tab and callsplaceholder_pane_group.detach_panes_for_close(...); that goes throughPaneGroup::detach_paneswithDetachType::HiddenForClose.TerminalManager::on_view_detachedis documented to preserve non-Closeddetaches, and the local GUI implementation only overrides it for shared-session cleanup.on_shell_determinedalso only checks whether the window is still open before spawning the shell.ChannelEventListener::send_wakeup_eventlogsFailed to send Wakeup event: Closed(..)when the receiver side of the wakeup channel has been dropped.This points to the placeholder terminal created for the drag preview as a plausible source of the closed wakeup channel/log spam, especially because the report's logs show a new shell spawning at preview creation. Implementation should verify whether the fix is to avoid creating a real terminal for
TransferredTabplaceholders, or to force-close the placeholder terminal with a permanent detach/shutdown before or during adoption. It should also verify whether the real moved session's wakeup receiver is affected, since the reporter observed visible input lag in the promoted window.Duplicate check
I enumerated all open non-PR issues in
warpdotdev/warpand checked recently closed issues from the last 7 days. No issue matched the same wakeup-channel/new-window tab-drag signature closely enough to mark this as a duplicate.This is my automated analysis and may be incorrect. A maintainer will verify the details.
Powered by Oz
warp-for-oss commentedon Jul 28, 2026
This issue has been labeled
ready-to-implementand is open for contributions involving code changes. If you'd like to tackle it, feel free to open a pull request against this issue. You can also comment@oz-agenton this issue to have the bot draft an implementation PR automatically.warp-agent-staging commentedon Jul 28, 2026
Your GitHub account is not connected to Warp. Connect it here.
bholmesdev commentedon Jul 28, 2026
@oz-agent implement this
warp-agent-staging commentedon Jul 28, 2026
Your GitHub account is not connected to Warp. Connect it here.
warp-for-oss commentedon Jul 28, 2026
@bholmesdev
I'm implementing this issue with no spec context.
You can view the conversation on Warp.
I created a new draft implementation PR for this issue.
Next steps:
Powered by Oz
Fix terminal lag + related warnings when dragging an active session t…
port(warpui_core): fix terminal lag when dragging an active session t…
Fix terminal lag + related warnings when dragging an active session t…
Fix terminal lag + related warnings when dragging an active session t…