[BUG] Escape key in /config → Output Style submenu returns to main chat instead of config menu

Resolved 💬 3 comments Opened Oct 4, 2025 by virenpepper Closed Oct 8, 2025

Thanks for taking the time to report this bug! Please fill out the sections below to help us understand and fix the issue.

Before submitting, please check:

  • You're using the latest version of Claude Code (claude --version)
  • This issue hasn't already been reported by searching existing issues.
  • This is a bug, not a feature request or support question

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When navigating through the /config menu system, pressing the Escape key from the "Output Style" submenu incorrectly returns the user to the main chat interface instead of the parent /config menu. This breaks the expected menu navigation hierarchy.

The navigation flow is:

  1. Main chat → /config → Config menu appears
  2. Config menu → Select "Output Style" → Output Style submenu appears
  3. Output Style submenu → Press Escape → BUG: Returns to main chat (should return to Config menu)

What Should Happen?

Pressing Escape from any submenu should return the user to its parent menu, maintaining the navigation hierarchy. In this case:

  • Escape from "Output Style" submenu → Should return to /config menu
  • Escape from /config menu → Should return to main chat

This follows standard menu navigation patterns where Escape acts as a "back" button in the menu stack.

Error Messages/Logs

No error messages are shown. The navigation simply jumps incorrectly to the main chat interface.

Steps to Reproduce

  1. Start Claude Code in terminal: claude
  2. Enter the command: /config
  3. When the config menu appears, select "Output Style" option
  4. Once in the Output Style submenu, press the Escape key
  5. Observe: You are returned to the main chat interface instead of the /config menu

Note: This bug specifically affects the Escape key behavior. Using other navigation methods may work correctly.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Claude Code Version

Latest version (please verify with claude --version)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

This appears to be a menu state management issue where the navigation stack is not properly maintained when entering submenus. The Escape key handler might be:

  1. Not tracking the parent menu reference when entering a submenu
  2. Using a global "exit to main" handler instead of a contextual "go back" handler
  3. Missing proper navigation stack management for nested menus

Similar navigation issues with the Escape key were previously reported and fixed in issue #4546, though that was for different menus (/agents, /bug). This suggests the fix might need to be applied more broadly across all menu navigation or there may be a regression in the navigation handling.

Expected Navigation Stack Behavior:

[Main Chat] → push → [/config menu] → push → [Output Style submenu]
                ← pop ←              ← pop (Escape) ←

Current Buggy Behavior:

[Main Chat] → push → [/config menu] → push → [Output Style submenu]
     ↑                                                    |
     └────────────────── direct jump (Escape) ───────────┘

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗