[BUG] Agent permission prompts render underneath other open UI panels but they capture keyboard input so you can approve, reject, or interrupt the agent without knowing it

Status Open
Reported on v2.1.218
Maintainer reply None cached
Activity 0 comments · opened Jul 24, 2026

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 I'm running in approve mode, I might be looking at some other UI panel (like /mcp or /usage) when the agent prompts me for input. I don't run the terminal fullscreen and so this prompt can appear _underneath_ the other UI panel and I don't know it's there. However, it _has_ captured keyboard input, so if I try to interact with the UI panel I can see, those keystrokes are going to the agent permission request. How this often manifests is that I press esc to get rid of the UI panel and that tells the agent to stop, but does not dismiss the panel. I press esc again and come back to an agent that's not doing anything but I don't know why, nor what it had prompted me for.

What Should Happen?

The keyboard input should remain on the open panel and only go back to the agent once dismissed.

Error Messages/Logs

Steps to Reproduce

  1. run bare claude code: claude
  2. run in approve mode
  3. run a prompt that will eventually ask for permission
  4. open another UI panel like /mcp or /usage
  5. wait until it's obvious that the agent has asked for permission
  6. the ui on the panel says press esc to canel
  7. press esc
  8. the panel stays up, but the agent has been interrupted
  9. press esc again
  10. the panel goes away and you can see that the agent was unexpectedly interrupted

Claude Model

Other

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.218 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

When I asked claude itself, it said:

no, there's no setting that fixes the layering itself — nothing forces the permission prompt to the foreground or stops panels like /mcp and /usage from rendering over it. What you're hitting (prompt draws underneath the open panel but still owns keyboard focus, so your Esc cancels the invisible prompt) is a genuine UX bug worth filing at https://github.com/anthropics/claude-code/issues.

and:

File a GitHub issue — asking that permission prompts never render behind an open panel / that an open panel blocks the prompt from grabbing focus.

View original on GitHub ↗