Skip to content

Ctrl+Q detach broken on WSL2 + Windows Terminal since v0.26.4 (regression) #410

@ofhtech

Description

@ofhtech

Environment

  • agent-deck: v0.26.3 → v0.26.4 (regression)
  • OS: Ubuntu 24.04 on WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
  • Terminal: Windows Terminal (default)
  • tmux: 3.4
  • Shell: bash

Problem

After upgrading from v0.26.3 to v0.26.4, Ctrl+Q no longer detaches from an attached tmux session back to the agent-deck TUI. The keypress is silently swallowed — the session remains attached with no visible effect.

v0.26.3: Ctrl+Q detach works correctly.
v0.26.4: Ctrl+Q does nothing. Session stays attached.

Suspected cause

v0.26.4 introduced several changes to keyboard handling:

  1. extended-keys on added to tmux sessions (Fix #342: enable extended-keys for Shift+Enter in tmux sessions #343) — this changes how tmux forwards modified key sequences to applications
  2. Enhanced keyboard protocol detection for Ctrl+Q (fix: detect Ctrl+Q in enhanced keyboard protocol encodings #357) — added ESC[113;5u and ESC[27;5;113~ decoding alongside raw ASCII 17
  3. tmux bind-key -n C-q detach-client fallback (Ctrl+Q detach not working (iTerm2 / macOS) — XON/XOFF flow control not cleared on attach PTY #361) — added for iTerm2/macOS XON/XOFF fix

With extended-keys on, Windows Terminal + WSL2 may encode Ctrl+Q in a format that is:

This is the same class of issue as #361 (macOS/iTerm2) but on a different platform. The fix for #361 may have inadvertently broken the previously-working raw byte path on WSL2.

Steps to reproduce

  1. Install agent-deck v0.26.4 on WSL2 (Ubuntu) with Windows Terminal
  2. Create or start a session (agent-deck add /path -t "test")
  3. Attach to the session (Enter)
  4. Press Ctrl+Q — nothing happens, session remains attached
  5. Workaround: Ctrl+B d (native tmux detach) still works

Expected behavior

Ctrl+Q should detach from the tmux session and return to the agent-deck TUI, as it did in v0.26.3.

Workaround

Ctrl+B d (standard tmux detach) works reliably.

Related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions