Skip to content

fix: lower curation threshold, add per-session tracking, and improve observability#56

Merged
BYK merged 1 commit intomainfrom
fix/curation-threshold-and-observability
Apr 8, 2026
Merged

fix: lower curation threshold, add per-session tracking, and improve observability#56
BYK merged 1 commit intomainfrom
fix/curation-threshold-and-observability

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented Apr 8, 2026

Summary

  • Lower afterTurns default from 10 to 3 — curation was effectively never firing on typical agentic sessions (3-5 user messages), especially since the counter resets on every OpenCode restart
  • Make lastCuratedAt per-session — the shared module-level timestamp caused cross-session leaking where curation on session A would advance the timestamp past session B's messages
  • Add diagnostic logging — curation skip reason with turn count, activeSessions gate, empty export detection, and message.updated fetch failures (was a silent empty catch {})

…observability

Curation was effectively never firing on typical agentic sessions because
afterTurns defaulted to 10 user messages — most sessions have 3-5. The
counter also resets on every OpenCode restart. Additionally, the module-level
lastCuratedAt timestamp leaked across sessions, causing curation on session B
to skip messages created before session A's curation.

- Lower afterTurns default from 10 to 3
- Make lastCuratedAt a per-session Map instead of a shared number
- Add diagnostic logging: curation skip reason, activeSessions gate,
  empty export detection, message.updated fetch failures
@BYK BYK enabled auto-merge (squash) April 8, 2026 19:13
@BYK BYK merged commit ca99533 into main Apr 8, 2026
1 check passed
@BYK BYK deleted the fix/curation-threshold-and-observability branch April 8, 2026 19:13
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