Feature 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.
Feature 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 alivepeer_id— unique per process, survives session restartsExtend 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.