[Cowork] computer-use cu-esc handler kills session with pending permission dialog
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?
Key details to include:
- Steps: open a computer-use session, then trigger
mcp__cowork__request_cowork_directoryfor an iCloud subfolder - Expected: permission dialog stays open for user interaction
- Actual:
[cu-esc]fires, session stops, pending permission resolves asdeny - The relevant log lines from
~/Library/Logs/Claude/main.log(the[cu-esc] escape pressedandBridge resolving permission ... behavior=denylines)
What Should Happen?
The permission dialog should stay open and wait for your input regardless of what the computer-use overlay does. The cu-esc handler should only close the computer-use window — it shouldn't propagate a session stop that kills unrelated pending dialogs.
Error Messages/Logs
Yes, paste these lines from `~/Library/Logs/Claude/main.log`:
2026-05-29 21:45:23 [info] Emitted tool permission request 81779538-fc70-419a-8a13-046aa39d27b8 for mcp__cowork__request_cowork_directory in session local_f9660ee7...
2026-05-29 21:53:44 [info] [cu-esc] escape pressed, stopping local_f9660ee7...
2026-05-29 21:53:44 [info] Bridge resolving permission 81779538...: behavior=deny (tool: mcp__cowork__request_cowork_directory)
The 8-minute gap between the first and last line is the dialog sitting open invisibly. The `[cu-esc]` line in the middle is the culprit — it stops the session, which then forces the permission to `deny`.
Steps to Reproduce
- Start a computer-use session (trigger any
mcp__computer-use__*tool so the glow window opens) - While the computer-use overlay is active, call
mcp__ccd_directory__request_directorywith an iCloud subfolder path (e.g.~/Library/Mobile Documents/com~apple~CloudDocs/Downloads) - The permission dialog is emitted but sits behind the glow window
- The
[cu-esc]handler fires and stops the session - The pending permission resolves as
deny— no user interaction possible
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Ran claude --version 2>/dev/null 2.1.149
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
2026-05-29 21:45:23 [info] Emitted tool permission request 81779538-fc70-419a-8a13-046aa39d27b8 for mcp__cowork__request_cowork_directory in session local_f9660ee7...
2026-05-29 21:53:44 [info] [cu-esc] escape pressed, stopping local_f9660ee7...
2026-05-29 21:53:44 [info] Bridge resolving permission 81779538...: behavior=deny (tool: mcp__cowork__request_cowork_directory)
Paste the three log lines from earlier:
2026-05-29 21:45:23 [info] Emitted tool permission request 81779538-fc70-419a-8a13-046aa39d27b8 for mcp__cowork__request_cowork_directory in session local_f9660ee7...
2026-05-29 21:53:44 [info] [cu-esc] escape pressed, stopping local_f9660ee7...
2026-05-29 21:53:44 [info] Bridge resolving permission 81779538...: behavior=deny (tool: mcp__cowork__request_cowork_directory)
The [cu-esc] handler fires from the computer-use subsystem (not user input), stops the entire session, and cascades into denying any pending permission dialogs. The permission dialog was never shown to the user. Logs from ~/Library/Logs/Claude/main.log.