Skip to content

Feature: Soft context reset / compaction command #28233

@zqchris

Description

@zqchris

Problem

Currently the only way to reset a session is /new or /reset, which wipes the entire conversation history. When a long session fills up the context window (e.g. 80%+), the only option is a hard reset that loses all conversational continuity.

Auto-compaction exists but cannot be manually triggered.

Feature Request

Add a soft reset command (e.g. /compact or /compress) that:

  1. Summarizes the current conversation into a concise context summary
  2. Clears the raw message history
  3. Resumes with the summary injected as context — so the agent retains awareness of what was discussed without carrying the full token weight

Expected Behavior

  • /compact → agent summarizes key decisions, context, and ongoing tasks → history is cleared → new messages continue with summary in context
  • Agent can reference prior work without having to re-explain everything
  • Costs significantly fewer tokens than keeping full history

Use Case

During long working sessions (e.g. debugging, building features, multi-step research), context fills up fast. A soft reset would allow continuing the same 'thread of work' without starting completely cold.

Compared to /new:

/new /compact (proposed)
History cleared
Context retained ✅ (via summary)
Continuity

Alternatives Considered

  • Manually asking the agent to summarize before /new (works but cumbersome)
  • Waiting for auto-compaction (not user-controllable, unpredictable timing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions