Skip to content

bug(node): canonical live room does not flip /chat/context/:agent room_status.in_session #1340

@itskai-dev

Description

@itskai-dev

Summary

Canonical live canvas session does not surface room-active truth into /chat/context/:agent. The node-side runtime stays in_session=false even while a real human user is actively signed in and present on the canvas.

Steps to reproduce

  1. Open a shared staging login session
  2. Force canonical host rn-34faba44-wlgkeq
  3. Open /canvas — confirm signed-in user is present and active
  4. Poll GET /chat/context/compass repeatedly during the live session
  5. Observed: all polls return room_status.in_session = false across 12+ consecutive polls

Root cause (known so far)

The node sets in_session = roomActiveCount > 0 where roomActiveCount comes from listRoomParticipants().length. Cloud proxy GET /api/hosts/:id/presence stayed green during the same window but only shows agent presence, not human room participants.

Next narrowing step (blocked)

Needs one of:

  • Heartbeat-token-authenticated GET /room/participants on rn-34faba44-wlgkeq during a live session
  • A surfaced cloud proxy route for room participants
  • Fly auth on a surface that already has it

If participants are present while /chat/context stays in_session=false → bug is in room_status derivation on the node
If participants are zero → bug is in room-presence join/write path

Without the authenticated participant probe, root cause cannot be narrowed further from cloud side.

Context

  • Canonical host: rn-34faba44-wlgkeq
  • Cloud API route: GET /api/hosts/:hostId/chat/context/:agentName
  • Node route: GET /chat/context/:agent
  • Evidence: gathered by link during live staging session
  • Labels: bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions