Skip to content

fix: profile, capture, and compaction regressions - #239

Merged
EyJunge1 merged 6 commits into
tickernelz:mainfrom
EyJunge1:fix/issues-231-232-236-237
Aug 7, 2026
Merged

fix: profile, capture, and compaction regressions#239
EyJunge1 merged 6 commits into
tickernelz:mainfrom
EyJunge1:fix/issues-231-232-236-237

Conversation

@EyJunge1

@EyJunge1 EyJunge1 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Accept LLM preference confidence on a 0–1 scale so Groq/Llama profile learning no longer fails schema validation
  • Cap auto-capture markdown context with autoCaptureMaxContextBytes to prevent context overflows on ~131K models
  • Preserve the active session agent when restoring memories after compaction
  • Wire profile decay to userProfileStaleDays / userProfileMinEvidenceForRetention, and merge partial AI cleanup into the full profile instead of replacing it

Closes #231
Closes #232
Closes #236
Closes #237

Test plan

  • bun run typecheck
  • bun test (396 passed)
  • Live verification against demo ~/.opencode-mem data for all four issue paths
  • API-path regression for partial AI cleanup apply preserving out-of-scope items

Made with Cursor

EyJunge1 and others added 6 commits August 7, 2026 20:17
Raise update_user_profile confidence max from 0.5 to 1 so Groq Llama
and similar models no longer fail schema validation on native scores.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cap buildMarkdownContext to autoCaptureMaxContextBytes (UTF-8) so large
AI responses no longer exceed small model windows such as Groq 131K.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve the session agent before compaction prompt injection so custom
primary agents are not silently reset to general-purpose.

Co-authored-by: Cursor <cursoragent@cursor.com>
Honor userProfileStaleDays/minEvidenceForRetention in decay, and merge
scoped AI cleanup results into the full profile instead of replacing it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent remaining data-loss, context-overflow, agent-fallback, and confidence edge cases found during review.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match cleanup scope removals by stable item identity and stop treating merge sources as unmentioned so rejected merges restore cleanly without leftover duplicates.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EyJunge1
EyJunge1 merged commit 22a8a77 into tickernelz:main Aug 7, 2026
@EyJunge1 EyJunge1 mentioned this pull request Aug 7, 2026
3 tasks
phil-lipp pushed a commit to phil-lipp/opencode-mem that referenced this pull request Aug 9, 2026
The compaction restore injected the memory dump as a normal text part,
so it was echoed into the live session transcript. Mark the part
synthetic so the TUI does not render it.

Follow-up to tickernelz#239, which preserved the session agent on compaction
restore but did not mark the injected part synthetic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment