Skip to content

Name another session in a reply only when sessionVisibleToRequest allows it #4923

Closed

Description

@thymikee

Problem

sessionVisibleToRequest (packages/daemon/src/sessions/session-routing.ts) is the rule that says whether a request may learn about a session. #4917 applies it to the session_list filter and to the shutdown DEVICE_IN_USE refusal. Other replies still name a session without asking that question. On a proxy shared by several clients under one token, that names another client's session address to a caller that must not learn it.

Required change

Route every reply that names a session other than the request's own session through sessionVisibleToRequest. When the check says the session is not visible to the request, answer without the name.

Open paths that name another session

  • Open contention: an open on a device held by another client's leased session returns DEVICE_IN_USE with the session name in the message and details (packages/daemon/src/sessions/open-device-contention-wait.ts around line 158, and packages/daemon/src/core/session-recovery-hints.ts around lines 56-57, which builds the recovery hint from that name).
  • Device-claim-conflict owner naming: the claim-conflict refusal names the owning session of the live claim.
  • Doctor same-device list: packages/daemon/src/sessions/handlers/session-doctor-options.ts around lines 99-108 collects other sessions that target the same device and prints them as Other active sessions target the same device: ....

References

#4917 fixed the list and the shutdown refusal. #4908 is the visibility issue this continues.

Activity

  1. apex-sentinel-staging commented on Nov 21, 2026

    @apex-sentinel-staging

    Apex Sentinel · Issue review

    Suggested label: bug

    The issue identifies existing daemon reply paths that expose other session names without checking sessionVisibleToRequest, citing specific files and code paths. It is actionable because the defect and required enforcement rule are clearly described.

    Required sections

    • Steps to reproduce (missing)
    • Expected and actual behavior (missing)
    • Version or environment (missing)
  2. added 2 commits that reference this issue on Nov 22, 2026
    f0af0cd
    bdf5096
  3. thymikee commented on Nov 22, 2026

    @thymikee
    MemberAuthor

    Fixed by #4953 (merged into 0.22).

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions