Repository navigation
feat(observe): close idle sessions - #756
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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