Skip to content

Track Pi session id alongside pid in Pinet agent roster and diagnostics #719

@gugu91

Description

@gugu91

Maintainer-requested follow-up from Slack thread 1777815587.943179.

Context

During ghost/recovery work, the broker could see agent pid and Pinet agent id in the roster, but needed to inspect the broker DB manually to find the original Pi session/stable id for resurrecting a specific worker. Tracking only pid is not enough for safe resurrection/reconnect workflows.

Useful fields observed manually:

  • Agent id: 7daefa35-d794-4196-887d-fc0964692389
  • PID before ghost: 27541; resurrected PID: 42791
  • Stable/session id: Wills-Mac-mini.local:session:/Users/will/.pi/agent/sessions/...jsonl

Ask

Track and expose the Pi session id / stable session file identity alongside pid in Pinet agent roster/status/diagnostics so brokers can safely identify and resume the exact Pi session for a worker.

Acceptance criteria

  • Pinet agent listing/status surfaces include a concise session/stable-id indicator alongside pid, without leaking sensitive paths unnecessarily in Slack-facing output.
  • Broker/RALPH diagnostics can identify the exact session/stable id needed for resurrection.
  • Tests cover the roster/formatting path and any metadata persistence changes.
  • Document safe handling/redaction expectations for session paths if shown in Slack/Pinet output.

No secret values should be logged or exposed.

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