Skip to content

fix: trigger initial session time threshold - #142

Open
GautamSharma99 wants to merge 1 commit into
Autoloops:mainfrom
GautamSharma99:fix/initial-session-time-threshold
Open

fix: trigger initial session time threshold#142
GautamSharma99 wants to merge 1 commit into
Autoloops:mainfrom
GautamSharma99:fix/initial-session-time-threshold

Conversation

@GautamSharma99

Copy link
Copy Markdown
Contributor

Summary

Fixes time-based automatic memory updates for new agent sessions.

Previously, each hook reset last_seen_at before the worker checked the time threshold, making the elapsed time effectively zero. New
sessions could therefore only trigger updates through the Stop-count threshold.

Changes

  • Added persistent first_seen_at session tracking.
  • Use first_seen_at for the initial time threshold.
  • Preserve existing post-memory-update and grace-period behavior.
  • Backfill existing sessions from last_seen_at.
  • Added regression and migration coverage.

Testing

npm test
npm run typecheck

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