[BUG] Desktop (Windows): clicking an image in a detached session window opens the viewer in the MAIN window - the detached window shows no response at all
Preflight
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
In the Claude Code desktop app on Windows, when a session is opened in its own detached window (Open in -> New window), clicking any image inside that detached window opens the image viewer in the MAIN Claude Code window instead of in the window that was clicked.
From the user's point of view in the detached window, nothing happens. The click appears dead. There is no viewer, no overlay, no animation, no focus change, no indication at all that anything was registered. Only when you manually alt-tab to the main Claude Code window do you discover the image sitting there, opened full-size over an unrelated conversation.
This affects both kinds of image in a detached window:
- Images the user attached to their own prompt - clicking the thumbnail in the composer / in the sent message.
- Images Claude displayed in its response - clicking the inline image in the transcript.
Both route the viewer to the main window.
The bug is especially disorienting because the image lands on top of a completely different session's content in the main window. You end up staring at your bar chart overlaid on some other project's transcript, with no visual link back to the window you were actually working in.
This looks like the same class of window-scoping defect already reported for other surfaces in detached windows:
- #63016 - detached window:
Cmd+/Cmd-zoom keystrokes routed to the main window instead - #62449 - detached/pop-out windows ignore zoom level
- #82924 -
/btwside chat does not work in detached windows (Windows) - #84889 - detached session windows have no close button and cannot be moved (Windows 11)
In each of those, some piece of UI state or input handling is bound to the main window rather than to the window that owns the session. The image viewer appears to have the same root cause: the lightbox/overlay is mounted into the main window's root rather than the focused window's root.
What Should Happen?
Clicking an image inside a detached session window should open the image viewer in that same detached window, over that window's own content, and that window should keep focus.
The image viewer should be scoped per-window, exactly like the session it belongs to. No window switch, no focus jump, no viewer appearing in an unrelated window.
Steps to Reproduce
- Open the Claude Code desktop app on Windows 11.
- Open any session, then detach it into its own window (
Open in -> New window). You now have the main Claude Code window plus a second, detached session window. - Bring the detached window to the foreground and give it focus.
- In the detached window's composer, attach an image to the prompt (drag-and-drop or paste a PNG - any small screenshot works). Send the message.
- Click the attached image thumbnail in the detached window.
- Observed: nothing visibly happens in the detached window. The click looks like it did not register.
- Alt-tab to the main Claude Code window.
- Observed: the image is open there, displayed full-size as an overlay on top of whatever unrelated session that window had loaded.
- Repeat with an image that Claude renders in its own response inside the detached window - clicking it behaves identically (viewer opens in the main window).
Expected at step 6: the image viewer opens in the detached window, over the detached window's content, with focus retained.
Additional Information
- Reproduces consistently, on every image click in a detached window.
- Reproduces for both user-attached images and Claude-rendered images.
- The main window does not raise itself or take focus when this happens, which is why the click reads as a total no-op. The user only finds the image by chance when switching windows.
- Practical impact: images are effectively unclickable in detached windows. Detached windows are exactly where visual work happens (charts, screenshots, UI diffs), so this makes reviewing any image in that workflow require a manual window hunt every single time.
- Suggested fix direction: mount the image viewer / lightbox portal into the root of the currently focused window rather than the main application window, matching how the session view itself is already scoped per-window.
Environment
| Field | Value |
|---|---|
| Claude Code version | 2.1.72 (Claude Code) |
| Surface | Claude Code desktop app (not the terminal CLI) |
| Operating System | Windows 11 Pro 10.0.26200 |
| Model in use | Opus 5 |
| Platform | Anthropic API |
| Regression | I don't know - detached windows have had several window-scoping bugs (see cross-references above) |