OpenCode Plugin
nexus-compaction-plus
v1.8.0PublishedPreserves Nexus session context across OpenCode compaction events and records each compaction as an auditable session entry.
Overview
When OpenCode compacts its context window, critical session metadata — such as the active Nexus project ID, session ID, and accumulated context — would normally be lost. nexus-compaction-plus intercepts compaction events at two stages: before compaction it injects session identifiers into the compaction prompt so the resuming agent retains full project context, and after compaction it records the event as an auditable entry in the active Nexus session via the platform REST API. This ensures continuity across compaction boundaries and provides a complete audit trail of context resets.
Registered Hooks
experimental.session.compactingInjects active Nexus session/project IDs into the compaction prompt for context preservation. Fires before OpenCode compresses the context window.
event (session.compacted)Records compaction event in the active Nexus session via REST API for audit trail. Fires after compaction completes successfully.