compact-session

Compact session memory into summary nodes to reduce context token usage.

7|2|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/BrennonTWilliams/little-loops --skill compact-session
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compact-session
Source: https://github.com/BrennonTWilliams/little-loops/tree/main/skills/compact-session
Command: npx skills add https://github.com/BrennonTWilliams/little-loops --skill compact-session

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the issue of long-running AI sessions consuming excessive context window space, which can lead to performance degradation or session termination.

Core Features & Use Cases

  • Manual Memory Compaction: Triggers the session-store compaction process to condense message history into summary nodes.
  • Context Management: Allows users to proactively reduce the token footprint of a session before hitting limits.
  • Use Case: When working on a long-horizon coding task, use this skill to summarize the conversation history, ensuring the agent maintains focus without losing critical context.

Quick Start

Ask the assistant to manually compact the current session memory to free up context space.

Frequently Asked Questions about compact-session

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce context window token usage in long-running AI development sessions?

To reduce context window token usage, trigger session-memory compaction to condense message history into summary nodes. This proactively optimizes memory before hitting context limits, preventing performance degradation during long-horizon tasks.

What is session memory compaction and how does it work?

Session memory compaction is a process that condenses message history into summary nodes. It uses the ll-compact-session CLI tool to execute idempotent summarization on the session database, reducing overall context token footprint while maintaining critical context.

When should I manually compact session memory to prevent performance issues?

You should manually compact session memory when working on long-horizon coding tasks where context window limits are approached. This proactive context management ensures the agent maintains focus without losing critical context as the session grows.

Do I need a specific CLI tool to condense message history into summary nodes?

Yes, condensing message history into summary nodes requires access to the session database and the ll-compact-session CLI tool. These dependencies execute the idempotent summarization process needed for effective context optimization.

What's the best way to free up context space without losing critical conversation history?

The best way to free up context space without losing critical history is manual memory compaction. It summarizes the conversation history into summary nodes, allowing you to reduce the token footprint while preserving essential context for the AI agent.

Does session compaction support idempotent summarization for repeated executions?

Yes, session compaction supports idempotent summarization through the ll-compact-session CLI tool. This ensures repeated compaction executions on the session database produce consistent summary nodes without duplicating data or corrupting the message history.