Skip to content

(remote): light the attention state when a remote session waits on a dialog #394

Description

@devsuitup

A local session lights the orange attention state when the CLI asks something (permission prompt, question, elicitation): wireSessionPty parses OSC 9 (main.js ~2170) and app.js ~568 calls setAttention. A remote session that is not attached never does. The descriptor that carries the answer is already pulled every refresh: ~/.claude/sessions/<pid>.json reaches the renderer with status, but applyRemoteDescriptor (public/remote-activity-ui.js ~162) only turns it into liveness (descriptorStatus → alive/dead) and the sidebar's text line.

What waiting means (read from the CLI bundle, 2.1.286)

function Mhe(h){let v=vso(h);if(v!==void 0)return{status:"waiting",waitingFor:v,working:!1};
 return{status:h.isLoading||h.delegatedActive?"busy":"idle",...}}

waiting is set whenever a blocking dialog is open and has priority over busy; the prompt at rest is idle, never waiting. A waitingFor field is written beside it: permission prompt (tool permission, plan approval, any dialog without its own label), input needed (MCP elicitation), dialog open, goal proposal, worker request, sandbox request. statusUpdatedAt is rewritten on each status write. This closes the reservation in .ai/contexts/cli-session-state.md ("the waiting branch was never observed").

Why OSC 9 does not cover it on a remote host

In preferredNotifChannel: auto the CLI picks a channel from the detected terminal (iTerm2, kitty, ghostty, Apple Terminal); under tmux on a host none is detected and nothing is emitted. Even an attached remote row therefore stays dark unless the host forces iterm2 and tmux has allow-passthrough on.

Scope

Unverified: a live descriptor observed during a permission prompt on a declared host.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions