Skip to content

feat(engine): manual /compact command and configurable compaction threshold #22

Open

Description

@EngineerProjects

Summary

Context compaction currently runs automatically when the context window
approaches the model limit. Add a /compact slash command so users can
trigger it manually, and expose the threshold as a configurable setting.

Scope

  • /compact slash command in the TUI — triggers compaction immediately
  • nexus config set compaction.threshold 0.8 — set the auto-trigger fraction
  • nexus config set compaction.enabled false — disable auto-compaction
  • Compaction summary displayed in the chat after /compact completes

Acceptance criteria

  • /compact registered in the commands palette and slash-command handler
  • Manual compaction produces the same summary message as auto-compaction
  • compaction.threshold config key accepted and persisted
  • compaction.enabled config key accepted and persisted
  • Docs updated in docs/sdk.md under "Long-context compaction"

Activity

  1. added
    enhancement
    core
    on Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions