[FEATURE] Let Remote Control sessions on a user's own machine attach a remote surface, so mods (ui.render) draw in the desktop and mobile view

Open
#111,514 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
api

Research direction

No files are named; start by finding where the session protocol handles initialize and ui_attach and where surfaces such as desktop and mobile are offered to a session, then trace what differs between an SSH-opened session and a Remote Control session from the same machine. The debug log in the report (verified device, get_workspace_diff, no ui_attach) is the evidence to reproduce against. Done means a Remote Control session on the owner's own machine receives the remote surface under the same owner-only/verified-device conditions, and ui.render output reaches the desktop and mobile views.

Written by the indexing model from the issue text.

Description

area:plugins enhancement platform:linux platform:macos

🤖 agent-dmo · session · session f6a0a9ba-656d-5abb-876b-3c431df2c930

Preflight Checklist
  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)
Problem Statement

A function-hooks plugin (a "mod") that draws assistant replies through ui.render works in the terminal and in a desktop-app SSH session, but not when the same session, on the same machine, is viewed through Remote Control.

In a Remote Control session started on the account holder's own Linux server (claude --remote-control, or a session the desktop app starts there through Remote Control), the desktop app's view shows the stored message text only. A mod that teaches the model inline tags therefore shows those tags raw, and its themed Markdown is not drawn.

Observed with Claude Code 2.1.330 and the macOS desktop app 6.28899.6, with --debug-file on the session:

  • the desktop client connects as a verified device (attestation=DEVICE_ATTESTATION_STATUS_VERIFIED) and sends initialize and get_workspace_diff;
  • it never sends ui_attach, so no remote surface joins and ui.render is never asked to draw for it;
  • the same mod draws that same reply correctly on the session's terminal surface, and draws in the desktop app when the session is opened over SSH instead.

So the surface a session gets depends on how the app reached it, not on the session or the plugin.

Proposed Solution

Offer the remote drawing surface (desktop, mobile) to Remote Control sessions that run on the user's own machine, under the same conditions already applied elsewhere (owner-only session, verified device), so a mod's ui.render output reaches the Remote Control view as it reaches an SSH session's.

Alternative Solutions
  • Start every session over SSH from the desktop app. That needs the laptop open when the session starts, which is what Remote Control sessions started on a server avoid.
  • Turn the mod off for Remote Control sessions (what we do today), losing its drawing there.
  • If the restriction is deliberate, document it and expose it to plugins (for example a trait or surface list at prompt.compose that says "this session is viewed only through Remote Control"), so a mod can keep its tag guide out of such sessions without reading environment variables.
Priority

Medium - Would be very helpful

Feature Category

Other

Use Case Example
  1. A server starts a few claude --remote-control sessions each morning, each already working on a prompt.
  2. The user opens the desktop app later and reads them from the session list.
  3. With a reply-styling mod installed on the server, those sessions should look like the SSH sessions the user opens to the same server: coloured status badges, themed headings and tables. Today they are plain, and tags show raw unless the mod is disabled for them.
Additional Context

The function-hooks API is in early access, so this may simply not be built yet; the request is to include Remote Control on self-run machines when it is.

Dominant language
TypeScript
Stars
156k
Forks
25k
Avg merge
16h 19m
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/claude-code

All issues in anthropics/claude-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.