Mod ui.render (AbovePrompt/Pane) not drawn in desktop/iOS views of a Remote Control session
Summary
A mod's ui.render output (e.g. an AbovePrompt band with a Button) is drawn in the terminal but never appears in the Claude desktop app or the Claude iOS app when they view the same session through Remote Control. Only mod-initiated AskUserQuestion prompts reach those views.
Repro
- Run a session in tmux on machine A (terminal surface) with a mod loaded via
CLAUDE_CODE_PLUGIN_DIRS. The mod renders anAbovePromptband:Textplus aButton. - Open the same session from the desktop app and from the iOS app via Remote Control.
- The band is absent in both. An SSH terminal attached to the tmux session shows it.
Expected
The docs list AbovePrompt and Pane as rendered on "Terminal, Desktop" (mods reference, render sites) and say both "work in" the terminal and the Desktop app. The API also lists desktop and mobile surfaces. I expected Remote Control views to draw the band, or the docs to say they don't.
Docs gap
Neither the mods reference/interface pages nor the Remote Control page says whether ui.render reaches Remote Control viewers, or whether mods draw only on the host surface. It is also unclear if the desktop surface draws mods only when the desktop app hosts the session.
Related
/feedback also does not work from the desktop app or iOS app in a Remote Control session. Many people drive terminal-hosted sessions from those apps, so terminal-only features are hard to use.
Claude Code 2.1.287, macOS. Feedback was also sent via /feedback (receipt 6c856a17-abfc-4e24-9560-1280829306a1).
Same on 2.1.289 (macOS), with two more data points.
A session started from the desktop app's Code tab draws mods fine there. Our open-asks band (an AbovePrompt with Text, Button and Input) renders in that Code tab, so the desktop surface works when the desktop hosts the session.
The same mod in a terminal session started with --remote-control draws only in the terminal. Open that session in the Code tab and nothing shows above the prompt. Its hooks still run there: the Stop hook keeps writing to $.store. Only the drawing never reaches the viewer.
I host most sessions in the terminal and read them in the desktop app all day, so for me mods are mostly invisible right now.
Separate thing, desktop-hosted session: a mod whose AbovePrompt mounts a Client module (a fork of mindful-claude) shows Client hooks/breathe.tsx: did not load within 10s (a content security policy may have refused its runtime...). Same mod, terminal host, draws fine. Want that in its own issue?
— printed by Claude Code, signed by me.
Same behaviour here on Linux, one version later.
Setup
- Host: Claude Code 2.1.289 on Debian 13, session served through
claude remote-control - Viewers: Claude desktop app 2.9939.4 on Linux (community package, not an official build) and the Claude mobile app
- Mod: a small plugin that draws an
AbovePromptband (Box+Text) and registers a slash command
What happens
- The mod loads in the Remote Control session: its slash command runs and its
classic.UserPromptSubmithook fires. - The
AbovePromptband never appears in the desktop app or the mobile app. $.session.surfaces()called from inside that session returns an empty list while both apps are viewing it. So no client attaches as a render surface at all (session.attachnever fires), rather than attaching and failing to draw.
Expected
The desktop app attaches as surface desktop and draws the band, as the render sites table says for AbovePrompt.
Updating the desktop app from a July build to 2.9939.4 made no difference.
Same here on newer builds — Claude Code CLI 2.1.291, Claude Desktop 2.19675.1 (bundled Claude Code 2.1.288), macOS. Our mod draws a button toolbar in the AbovePrompt band (logo + buttons that run a skill, send a prompt or fill the input), loaded via CLAUDE_CODE_PLUGIN_DIRS.
One data point that narrows it down: the same mod IS drawn in the Desktop app when the session is a local one created in the Desktop Code tab (bordered band, buttons as chips with hotkey badges). It is only missing when Desktop, claude.ai or mobile view a terminal-hosted session over Remote Control. So the Desktop renderer supports it; what is missing is forwarding ui.render to remote viewers and routing onPress / ui.press back to the host session.
The public mods types already seem to anticipate this: RenderSurface = 'terminal' | 'desktop' | 'mobile' | 'vscode', session.attach / session.detach for remote clients, and a viewport note about "a remote surface".
Same on Linux with a headless host, plus what does reach Remote Control viewers.
Setup
- Host: Ubuntu 24.04,
claude remote-controlas a systemd user service (no terminal attached) - Mods loaded via
CLAUDE_CODE_PLUGIN_DIRS - Viewers: Claude desktop app, claude.ai in the browser, claude.ai installed as a Chrome PWA on Android, and the native Android app
What reaches the viewers (measured today, same mods, same viewers)
| Mod output | Desktop app | claude.ai (browser / Android PWA) | Native Android app |
|---|---|---|---|
AbovePrompt band, $.ui.status, $.ui.toast (2.1.292) |
no | no | no |
$.ui.log(text) transcript line, host 2.1.289 |
yes | yes | no |
$.ui.log(text) transcript line, host 2.1.291 / 2.1.292 |
no | no | no |
Slash command (command.register) text reply (2.1.292) |
yes | yes | yes |
$.session.surfaces() is [] and session.attach never fires on any of these versions, as reported above.
So the fallback the mods overview suggests ("a line in the transcript or a command's text reply where nothing draws") is half gone: the $.ui.log line seems to have broken in 2.1.290 or 2.1.291 (we checked by running remote-control from the old 2.1.289 binary on the same machine), and the native Android app never showed it. Right now a slash command's reply is the only mod output that reaches every RC viewer.
Two asks, short of full ui.render forwarding:
- Bring the
$.ui.logline back for RC viewers, and show it in the native mobile apps too. - Let a mod know that an RC viewer is connected (e.g. a
remoteentry insurfaces(), even if it can't draw yet), so it can choose its fallback.
— printed by Claude Code, signed by me.
+1, same here on macOS (Apple Silicon). Some extra detail in case it helps:
Setup: claude remote-control --spawn worktree on a home Mac, sessions opened from the Claude desktop app (same Mac) and the iOS app. Session CLI 2.1.291; also checked 2.1.294. Desktop app 2.26454.2.
What I see
- An
AbovePromptband from a user-scope installed plugin draws fine in a terminal session and in a Local Code tab session in the desktop app. - In the RC session, a probe mod logged
$.session.surfaces()as[]atsession.startand never saw asession.attachevent over ~20 minutes of active use from the desktop app. TheAbovePromptrender hook was never called. $.ui.status(...)and$.ui.toast(...)fromsession.start/turn.completealso never appear in the desktop or iOS view of the RC session.
Why I think it's the viewer side: the CLI appears ready to serve remote surfaces (it handles a ui_attach control request and gates on the session-writers statement), but the RC viewer never seems to send ui_attach, so the session has no surface to render for.
Use case: starting sessions on the home Mac from my phone is the whole reason I use RC, so it would be great for mod UI (or at least ui.status) to reach RC viewers.
Same on 2.1.293 (WSL2 host, claude --remote-control in a terminal), viewed from the updated Claude mobile app and from claude.ai in Chrome. A probe mod that draws an AbovePrompt band only for non-terminal surfaces and logs session.attach never drew or logged for either viewer: both connect (control_request initialize, the browser also get_context_usage), neither attaches as a surface.
One more thing to forward beside ui.render: the viewer's prompt box. Our mod (OpenCues) works on prompt.edit: it reads the draft as it is typed, answers with decorations, and takes a _ before it lands. From a Remote Control viewer no prompt.edit arrives at all; only the finished prompt does. The engine already has the relay for a remote composer (ui_prompt_edit, ui_prompt_fill, decorations carried with the answer), so a viewer that attached and routed its box through it would get every prompt-box mod working, not only the ones that draw bands.
Same result on Linux with Claude Code 2.1.289, with a different host setup: the session is not a tmux terminal but a child spawned by claude remote-control --spawn same-dir (it runs as claude --print --sdk-url … --session-id cse_…, no TTY), viewed from the Claude desktop app and the Android app.
Probe mod (hot-reloaded from the session's dev-mods folder) with a Pane opened from session.start and session.attach, an AbovePrompt band, and a log line for every ui.render ask and every attach. After loading and sending prompts from both apps, the log holds exactly one line: session.start, surfaces=[]
No session.attach, no ui.render for either component, from any surface. The "Enable hot reloading for this session?" question itself did reach the app, so the control channel works; the viewers just never attach as render surfaces.
So for spawned Remote Control sessions nothing draws at all, not even a terminal, which makes mods unusable there except for slash-command text replies. +1 for having RC viewers send ui_attach, or at least documenting that mods only draw on a host surface.
Same result on Windows 11 with Claude Code 2.1.299. One new data point: the session here is hosted by the desktop app itself (a local session started in the Code tab), not a terminal. The phone still never attaches.
Setup
- Host: Claude desktop app 2.42304.0 (bundled Claude Code 2.1.299), Windows 11, local session in the Code tab with Remote Control on
- Viewer: Claude Android app, same session over Remote Control
- Mod: hot-reloaded from the session's dev-mods folder. It hooks
ui.renderforToolUseandToolGrouponsurface: 'mobile'to drawshow_widgetSVGs with anSvgelement, and logssession.attach,session.detach,$.session.surfaces()and everyui.renderask to a file.
What the log held after viewing the session on the phone, and after drawing a new widget while the phone had it open
surfaces: ["desktop"]
attaches: []
renders: desktop/AssistantMessage 20, desktop/ToolUse 19, desktop/ToolGroup 21,
desktop/UserMessage 7, desktop/Spinner 25, desktop/AbovePrompt 2,
desktop/SessionMode 1
mobile: 0 asks of any component
show_widget rows asked for: 0 (desktop and mobile)
So it is not limited to terminal-hosted sessions. Even when the desktop app hosts the session, the phone viewer never sends an attach and never asks for a render. The desktop app also never asks the mod to draw the show_widget row; it draws that row itself.
The same mod passes claude plugin test when mounted on the mobile surface (the Svg row and its Buttons validate), so the drawing side looks ready. Only the attach from the viewer is missing.
Why it matters: this is the same gap as #78883 (closed by the inactivity bot, not fixed). show_widget output shows as raw tool text, or not at all, in every Remote Control view, so a mod was the only way I found to bring it back on the phone. Today the only workaround that reaches the phone is publishing the widget again as an Artifact and opening the link.
Asks, in line with the ones above:
- Have Remote Control viewers send
ui_attach, soui.renderreaches them. - Until then, render
show_widgetSVG output in Remote Control views natively, or degrade it to a static image (#78883).
Reproduces here too: the remote-control session runs on Linux (Claude Code 2.1.301, claude --remote-control in tmux) and I view it from the Claude desktop app on Windows. An AbovePrompt band with buttons draws in the terminal, but nothing shows in the desktop app. Logging session.attach and ui.render in the mod showed only the terminal surface ever attaching or rendering - the desktop app never attached as a surface.
+1
Same on a newer build, Claude Code 2.1.310 on macOS. The session runs in a terminal with Remote Control on. The viewers are the Claude desktop app (latest) and the Claude phone app.
A probe mod logs the surfaces it can draw on. When I type its slash command from either viewer, the command runs, but $.session.surfaces() returns ["terminal"]. $.ui.open reports isPlaced: true, and the pane draws only in the terminal. Neither viewer raises session.attach, and the probe logs no ui.render from any surface but terminal.
$.ui.status does not reach the viewers either. Its doc comment says the text is drawn "10000 remotely", but neither viewer shows it.
Use case: a build gate posts its progress line from a mod so we can watch it from a phone without spending a model turn. Today that line exists only on the host terminal.
Drafted with Claude Code (AI-assisted); details verified on my machine.
Same on current builds, on iOS, and for backdrops too: Claude Code 2.1.325 in the Claude desktop app 5.11492.5 (macOS 27.2.1), local session in the Code tab with Remote Control on, viewed from the Claude iOS app 1.261113.19.
A probe mod logged session.attach/session.detach and every ui.render on Backdrop. /probe typed from the phone printed $.session.surfaces() = desktop only, and the only Backdrop request came from the Mac's desktop surface. The phone never attaches, so $.theme.set backdrops, which the API docs describe as drawn by the desktop and mobile apps, don't reach it either.
Repro and details: #110856, which I'm closing as a duplicate of this one.
We're building OpenCues, a mod that draws inline notes in the prompt box through $.prompt.paint and prompt decorations. Following this thread on 2.1.330: the "Where mods run" table still says what a mod draws appears in the terminal on the machine running Claude Code, for Remote Control from claude.ai or the phone.
Could you say whether the prompt box's own paint and decorations are in scope for Remote Control viewers, or only AbovePrompt and Pane? Those are different render paths, and knowing which one is planned would let mod authors decide what to build for the phone and web. Thanks for the ContextMenu and AgentRow additions in this release.