Skip to content

(remote): a live remote session with no transcript yet is invisible and cannot be stopped #278

Description

@devsuitup

Symptom

Observed 2026-09-12 on v0.0.76 (and unchanged by #274): a remote CLI launched in tmux on the host writes its descriptor ~/.claude/sessions/<pid>.json at once, but no transcript until the first prompt is sent. The remote inventory (LIST_COMMAND in remote-transport.js) lists .jsonl and .meta.json files only, so the session has no row in the sidebar until it has been prompted once — a manual host refresh does not help. Measured: launched 00:47, invisible until a first prompt at 00:50 created -srv-echanges-switchboard-test/934a8ba5-….jsonl.

Why it matters

Since #272 a remote row is the only place to stop a remote process, and since #267 a listed descriptor means "alive". A running CLI that never got a prompt is a live process nobody can see or stop from the app — the same class of gap as #271.

Fix

Let the inventory report live descriptors that have no transcript yet (the descriptor carries cwd, pid, status, tmux), and let remote-index.js synthesize a placeholder session for them: project from cwd, id = the descriptor's session id if present else pid:<n>, liveness: alive, no transcript; the row is attachable and stoppable, shows the status/age, and is replaced by the real session once its .jsonl appears (same id, so no duplicate row). Mirror nothing for it.

Acceptance

  • A descriptor with no transcript yields one row within one poll; the row attaches and stops like any other.
  • When the transcript appears, the row is the same row (no duplicate, no flicker) — test on the id mapping.
  • A dead pid's descriptor (ALIVE:0) still yields nothing.
  • Mutation dropping the placeholder synthesis makes the first test red.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions