Skip to content

feat: Save current context window with rlm remember (no args) #38

@marknutter

Description

@marknutter

Summary

When rlm remember is called with no arguments (via MCP rlm_remember with no content), it should archive the current active Claude Code session — essentially an on-demand version of what the PreCompact and SessionEnd hooks already do.

Motivation

Users sometimes want to explicitly save the current conversation context before it gets compacted or the session ends. This gives manual control over what gets preserved in memory.

Proposed Behavior

  • rlm remember with no content → detect the active session JSONL file, run the same two-tier archival pipeline (summary + compressed transcript + fact extraction)
  • Should reuse the existing archive_session() logic in rlm/archive.py
  • MCP: rlm_remember called with empty/missing content parameter triggers this behavior
  • Output should confirm what was saved (session ID, summary size, transcript size)

Acceptance Criteria

  • rlm remember with no args archives the current session
  • Reuses existing archival pipeline (no duplicate logic)
  • Deduplication works (re-running doesn't create duplicate entries)
  • MCP tool works the same way
  • Tests cover the new code path

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions