claude-code - 💡(How to fix) Fix [Cowork] computer-use cu-esc handler kills session with pending permission dialog

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

Code Example

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`.

---

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)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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_directory for an iCloud subfolder
  • Expected: permission dialog stays open for user interaction
  • Actual: [cu-esc] fires, session stops, pending permission resolves as deny
  • The relevant log lines from ~/Library/Logs/Claude/main.log (the [cu-esc] escape pressed and Bridge resolving permission ... behavior=deny lines)

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

  1. Start a computer-use session (trigger any mcp__computer-use__* tool so the glow window opens)
  2. While the computer-use overlay is active, call mcp__ccd_directory__request_directory with an iCloud subfolder path (e.g. ~/Library/Mobile Documents/com~apple~CloudDocs/Downloads)
  3. The permission dialog is emitted but sits behind the glow window
  4. The [cu-esc] handler fires and stops the session
  5. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Cowork] computer-use cu-esc handler kills session with pending permission dialog