Skip to content

feat(observe): close idle sessions - #756

Merged
LinuxDevil merged 2 commits into
mainfrom
obs/o32-idle-sessions
Oct 28, 2026
Merged

LinuxDevil merged 2 commits into
mainfrom
obs/o32-idle-sessions

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Sessions only left 'active' when their agent went down, so Threads showed everything live and retention never pruned them; the daemon sweep now ends idle sessions (--session-idle-minutes, default 30) and new activity reopens them.

Ticket: O32 (Forge Observe vs LangSmith evaluation follow-up)

Changes

  • fix(observe): interrupted runs do not keep a session open
  • feat(observe): close idle sessions

Verification: focused vitest, tsc --noEmit, eslint on changed files (details in the review package); full suite and fallow run in CI.

🤖 Generated with Claude Code

LinuxDevil and others added 2 commits October 29, 2026 00:21
The sweep ends an active session (status 'ended', ended_at = its last
activity) once none of its observations is open and nothing in it started
or finished within the idle window (`observe start --session-idle-minutes N`,
default 30, 0 = off). New activity past ended_at reopens an ended or
interrupted session on ingest; stale or reordered events do not. Retention
then prunes ended sessions like any other finished one. Studio's Threads
status facet offers 'ended'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The idle pass treated a run the sweep marked 'interrupted' (end still
NULL) as open, so a session whose process died while its agent stayed
healthy never ended. Such a run now no longer blocks the close, and it
counts as activity at its interrupt time (its updated_at), so the idle
window starts there instead of at the dead run's old start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LinuxDevil
LinuxDevil merged commit 61843ad into main Oct 28, 2026
2 checks passed
@LinuxDevil
LinuxDevil deleted the obs/o32-idle-sessions branch October 28, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant