`Ctrl + Shift + A` unexpectedly archives the thread

Open 💬 3 comments Opened May 25, 2026 by disjukr

What variant of Codex are you using?

Windows App

What version of the Codex App are you using (From “About Codex” dialog)?

26.519.41501

What issue are you seeing?

While I was entering instructions, I tried to press Ctrl+A to delete the text and rewrite it, but I accidentally pressed Shift as well, so Ctrl+Shift+A was entered.
Suddenly the thread disappeared and a new chat screen opened, which was pretty alarming.

In the GUI, archiving a thread requires an additional confirmation step, but in the keyboard shortcut scenario it just disappeared immediately, which was the first thing that caught me off guard.

Then, because I didn’t want to run into this issue again, I opened the keyboard shortcuts screen, only to find there was no option to disable or remap the shortcut, which was the second thing that surprised me.

View original on GitHub ↗

3 Comments

jshaofa-ui · 3 months ago

Solution: codex #24413 — Ctrl+Shift+A unexpectedly archives the thread

Issue Summary

While typing instructions, pressing Ctrl+A (select all) but accidentally hitting Ctrl+Shift+A archives the current thread immediately without confirmation. The GUI requires a confirmation step for archiving, but the keyboard shortcut bypasses it. No option to disable or remap the shortcut exists.

Root Cause Analysis

The keyboard shortcut handler for Ctrl+Shift+A (archive thread) does not include a confirmation dialog, while the GUI archive action does. This creates an inconsistency where:

  1. GUI path: Click archive → confirmation dialog → archive
  2. Keyboard shortcut path: Ctrl+Shift+A → immediate archive (no confirmation)

The shortcut collision is particularly problematic because:

  • Ctrl+A is universally used for "select all" in text inputs
  • Shift is a modifier that can be accidentally pressed while reaching for Ctrl+A
  • The result is a destructive action (thread disappears) with no undo

Proposed Fix

Fix 1: Add confirmation for keyboard shortcut archive (immediate, minimal change)

// In the keyboard shortcut handler (likely in TUI or app keyboard handler)
function handleArchiveThreadShortcut() {
  // Current: immediate archive
  // archiveCurrentThread()
  // closeThreadView()
  
  // Fixed: show confirmation before archiving
  const confirmed = await showConfirmationDialog({
    title: 'Archive Thread',
    message: 'Are you sure you want to archive this thread? You can find it in the archived threads list.',
    confirmText: 'Archive',
    cancelText: 'Cancel',
    // On TUI, use a prompt; on GUI, use a modal dialog
  })
  
  if (confirmed) {
    archiveCurrentThread()
    // Show undo toast
    showUndoToast('Thread archived', { 
      action: () => unarchiveThread(currentThread.id) 
    })
  }
}

Fix 2: Remap to a less collision-prone shortcut

Change from Ctrl+Shift+A to Ctrl+Shift+Alt+A or Ctrl+Shift+Delete:

// Keyboard shortcut configuration
const SHORTCUTS = {
  // Current (collision-prone)
  // archiveThread: ['ctrl+shift+a'],
  
  // Fixed: less collision-prone
  archiveThread: ['ctrl+shift+alt+a'],  // or ['ctrl+shift+delete']
  
  // Also add: undo archive
  undoArchive: ['ctrl+z'],
}

Fix 3: Add undo capability for archived threads

// After archiving, show undo toast
function archiveCurrentThread() {
  const threadId = currentThread.id
  const threadTitle = currentThread.title
  
  // Archive
  threadStore.archive(threadId)
  
  // Show undo toast (5 second window)
  showToast({
    type: 'info',
    message: `Thread "${threadTitle}" archived`,
    action: {
      label: 'Undo',
      onClick: () => {
        threadStore.unarchive(threadId)
        threadStore.setActive(threadId)
      }
    },
    duration: 5000,
  })
}

Fix 4: Allow users to disable/remap shortcuts

// In settings
interface KeyboardShortcutSettings {
  archiveThread: string[]  // default: ['ctrl+shift+a']
  // Allow users to set to [] to disable
}

// In the shortcut handler
function isShortcutEnabled(action: string): boolean {
  const shortcuts = settings.keyboardShortcuts?.[action]
  return shortcuts && shortcuts.length > 0
}

// Register shortcuts dynamically
function registerShortcuts() {
  for (const [action, bindings] of Object.entries(settings.keyboardShortcuts || {})) {
    if (bindings.length === 0) continue  // disabled
    for (const binding of bindings) {
      hotkeyManager.register(binding, () => handleShortcut(action))
    }
  }
}

Fix 5: Prevent archive during text input

// In the keyboard shortcut handler
function handleKeyDown(event: KeyboardEvent) {
  // If user is typing in a text input, don't trigger archive shortcuts
  const activeElement = document.activeElement
  if (activeElement && (
    activeElement.tagName === 'TEXTAREA' ||
    activeElement.tagName === 'INPUT' ||
    activeElement.isContentEditable
  )) {
    // Check if this is the archive shortcut
    if (isArchiveShortcut(event)) {
      // Only trigger if Ctrl+Shift+Alt+A (the new binding)
      // Ctrl+Shift+A should be ignored when typing
      if (!event.altKey) {
        event.preventDefault()
        return  // Don't archive while typing
      }
    }
  }
  // Normal shortcut handling
  handleShortcutFromEvent(event)
}

Recommended Implementation

Immediate: Fix 1 (add confirmation) + Fix 5 (prevent during text input)
Short-term: Fix 2 (remap to less collision-prone shortcut)
Long-term: Fix 3 (undo) + Fix 4 (customizable shortcuts)

Test Plan

  1. Ctrl+A alone: Should select all text (no change)
  2. Ctrl+Shift+A: Should show confirmation dialog before archiving
  3. Ctrl+Shift+Alt+A (new binding): Should archive with confirmation
  4. Archive during typing: Ctrl+Shift+A while typing in input should be ignored
  5. Undo archive: After archiving, undo button should restore the thread
  6. Disabled shortcut: Setting shortcut to [] should disable it entirely

Impact Assessment

  • Severity: P2 — accidental thread archiving is alarming and disruptive
  • Affected users: Windows app users who type quickly and may accidentally hit Ctrl+Shift+A
  • Fix complexity: Low — adding confirmation is a few lines
  • Risk: Minimal — defensive change that only makes the action safer

Submission

Post as comment on: https://github.com/openai/codex/issues/24413

alibrohde · 3 months ago

This also happens on macOS, but the shortcut is Command+Shift+A, not Ctrl+Shift+A. It archives the current thread immediately, which is useful once discovered, but it is surprisingly hard to find and does not appear in an obvious place.

Expected behavior:

  • Document this in the keyboard shortcuts view.
  • Make it searchable from the command palette.
  • Ideally support Command+W as the Mac-native “close/archive current thread” shortcut without closing the whole app window.
0xdevalias · 2 months ago
This also happens on macOS
* Document this in the keyboard shortcuts view.

It seems to be there as of "Version 26.608.12217 • Released Jun 9, 2026" (or potentially earlier):

<img width="708" height="260" alt="Image" src="https://github.com/user-attachments/assets/e6645618-0667-4107-9775-af167b2a47c0" />

* Make it searchable from the command palette.

Its searchable within the "Command Palette" search, main "Settings" search, and the "Settings -> Keyboard Shortcuts" search:

<img width="535" height="123" alt="Image" src="https://github.com/user-attachments/assets/643bbaf7-7f0c-4db8-b9c2-75dcd90958b7" />

<img width="311" height="276" alt="Image" src="https://github.com/user-attachments/assets/392f8d3f-9367-4c28-8384-a8e3b56b63cd" />

<img width="702" height="252" alt="Image" src="https://github.com/user-attachments/assets/27fe9cf7-4a6c-40f8-909d-ccef06c1f299" />

* Ideally support Command+W as the Mac-native “close/archive current thread” shortcut without closing the whole app window.

This is currently bound to close window, which is far more canonical than archiving:

<img width="711" height="253" alt="Image" src="https://github.com/user-attachments/assets/65e462dd-3bd0-48e8-b6b4-1bd83fb84625" />