You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Session heartbeat for multi-session liveness detection #27742
I have verified this feature I am about to request has not been suggested before.
Describe the enhancement you want to request
OpenCode advertises multi-session ("Start multiple agents in parallel on the same project") but provides no way for sessions to detect each other. If a parallel session crashes or hangs, its resources (temp dirs, ports, files) are never released, and other sessions have no way to know.
Add two fields to the existing session table:
heartbeat_at — timestamp, written every 30s while session is alive
peer_id — unique per process, survives session restarts
Extend the existing compaction/prune to skip sessions with heartbeat_at older than 5 min as stale.
Why core: multi-session is a public feature, but without heartbeat it is unsafe. External modules (MCP, SLM) can read the DB for coordination; core just tracks liveness.
Scope: ~10 lines across 3 existing files (session/schema.ts, session/lifecycle.ts, session/compaction.ts). No new tables, no new config, no new dependencies.
Activity
github-actions commentedon May 15, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:— please rename to something like:[FEATURE]: Session heartbeat for multi-session liveness detectionPlease edit this issue to address the above within 2 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon May 15, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.