Gatewarden Nexus
Docs
Plugins
What's new
Roadmap
Tools
Your Nexus

OpenCode Plugin

nexus-session-guard

v1.2.0Published

Enforces session append discipline: detects code-changing tool completions with no matching nexus_session_append and injects a reminder.

Overview

Agents frequently skip nexus_session_append after completing work, leaving gaps in the session audit trail. This plugin tracks user-turn and append-turn indices, detects when a code-changing tool (Edit, Write, MultiEdit, non-read-only Bash, nexus_task_create, nexus_adr_create, nexus_adr_decide) completes without a session entry recorded since the last user instruction, and injects a system reminder into that tool's output. In Claude Code, it also adds one line at session start when no open Nexus session matches the current staging/release-X.Y.Z branch (NEXUS_SESSION_GUARD_RELEASE_NUDGE=off disables it).

Registered Hooks

tool.execute.after

Detects trigger tools (Edit/Write/MultiEdit/non-read-only Bash/nexus_task_create/nexus_adr_create/nexus_adr_decide) and injects a session-append reminder when no entry was recorded since the last user turn.

event (message.created)

Tracks the user-turn index used to determine whether a session append is still owed.

Details

DistributionTypeScript source via nexus pull into .opencode/plugins/, no npm install required.
Dependency@opencode-ai/plugin (auto-installed via .opencode/package.json).
RequiresAn active Nexus MCP session (checks whether nexus_session_append was called).

Plugin Info

Version
v1.2.0
Hooks
2
Custom Tools
0

Source Code

View the full source, report issues, or contribute on GitHub.

View repository
All pluginsBack to toolsView on GitHub

Get started

Ready to put specifications first?
Start building with Nexus.

Governed specs drive your agents. No ad-hoc prompts, no vibe coding.

Sign in with GitHub
Gatewarden Nexus

Platform

  • Documentation
  • Tools
  • What's new
  • Roadmap
  • Pricing

Resources

  • MCP Server
  • CLI
  • GitHub

Company

  • RelicFrog
  • Imprint

Legal

  • Privacy policy
  • Terms of service
© 2026 RelicFrog Holding UG (haftungsbeschränkt)·v0.17.2 (aea217e)
a Gatewarden product by RelicFrog Holding UG