Skip to content

Date sessions by their last message, not the transcript file - #8

Merged
MilosMosovsky merged 2 commits into
mainfrom
fix/session-last-active
Nov 6, 2026
Merged

MilosMosovsky merged 2 commits into
mainfrom
fix/session-last-active

Conversation

@MilosMosovsky

Copy link
Copy Markdown
Owner

What and why

The tcg-feed session, idle since Nov 3, showed up in the last 24 hours of a summary. Claude Code keeps appending bookkeeping lines (custom-title, cost-state, bridge-session, last-prompt) to idle transcripts, which moves the file mtime that agentyard used as "last active".

  • Session.LastActive() is the newest user/assistant message (Claude) or message/tool call (Codex), falling back to mtime. The summary window, touched times, topic activity, note fingerprints and the Sessions tab (Last active, sort, filter) all read it.
  • mtime still keys the parse cache; the cache file moves to sessions-v2.json so sessions cached before this are read again.
  • The corpus prefilter now keeps files written since the window start, since a file written after the window end can still hold activity inside it.

On this Mac: tcg-feed now reads last active Nov 3, 11:07, and sessions active in the last 24 hours outside scratch folders drop from 27 to 18.

Checklist

  • gofmt -l . clean, go vet ./... and go test -race ./... pass (168 s)
  • Tests: bookkeeping writes leave a session out of the window and keep its cached note

🤖 Generated with Claude Code

https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy

MilosMosovsky and others added 2 commits November 6, 2026 16:01
Claude Code appends bookkeeping lines (custom-title, cost-state,
bridge-session, last-prompt) to idle transcripts, so a session idle since
Nov 3 showed as active today: it entered the summary's 24-hour window and
the top of Sessions. Session.LastActive is now the newest message or tool
call, falling back to mtime; the summary window, touched times, topic
activity, note fingerprints and the Sessions tab all read it. mtime still
keys the parse cache, which moves to sessions-v2.json so cached sessions
are read again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtvhFvhWywmqE7ZEmKxLJy
@MilosMosovsky
MilosMosovsky merged commit c294262 into main Nov 6, 2026
2 checks passed
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