feat(moderator-gate): deviation detection and user warning hooks#4510
Closed
herjarsa wants to merge 11 commits into
Closed
feat(moderator-gate): deviation detection and user warning hooks#4510herjarsa wants to merge 11 commits into
herjarsa wants to merge 11 commits into
Conversation
…wake-live-session-20260523
…-parent-wake-live-session-20260523 fix(background-agent): suppress redundant parent wakes during gate hold
…ow-opencode-session-skill-20260523 docs(skills): tighten PR workflow and add session debugging
…and user warnings Phase 1-4 implementation: - Fase 1: Hook tool.execute.after con logging de ejecuciones - Fase 2: Deviation detection (writes, bash, outputs, plan context) - Fase 3: Decision engine + warning injection en outputs - Fase 4: Persistencia durable en .omo/moderator-decisions.jsonl Tres niveles de severidad: leve (log), media (aviso), grave (warning)
- Accept upstream refactor of private methods to standalone functions in parent-wake-notifier.ts - Accept upstream new test case for dispatched wake tracking after hold expiry
code-yeongyu
requested changes
Jun 4, 2026
code-yeongyu
left a comment
Owner
There was a problem hiding this comment.
I can’t approve this PR while it introduces forbidden deprecated model references.
The PR diff adds multiple GPT-5.2 xhigh PR review / GPT-5.2 reviewer requirements in the work-with-pr skill docs. Repository policy now forbids GPT-5.2/GPT-5.3 usage. Please migrate every new GPT-5.2/GPT-5.3 reference in this PR to GPT-5.5, then rerun the relevant documentation/skill checks before requesting review again.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ModeratorGate hook system that detects when agents deviate from user instructions and warns the user.
Features
Testing
All existing tests pass, typecheck clean.
Summary by cubic
Adds a ModeratorGate hook that detects deviations during tool runs, warns the user inline, and records decisions. Also fixes duplicate parent wake prompts by suppressing redundant wakes during the gate hold.
New Features
.omo/moderator-decisions.jsonl.bashpatterns, error-y tool output, and writes with zero plan progress; severities: leve, media, grave.create-tool-guard-hooks,tool.execute.after, andsrc/hooksexport; hook name added to the hook schema.opencode-session-debuggingskill.Bug Fixes
promptAsyncpost-dispatch hold to avoid duplicate assistant streams.dev, adopt upstream refactor inparent-wake-notifier, and add a test for dispatched-wake tracking after hold expiry.bun.lock: bump optionaloh-my-opencode-*dependencies to4.5.1.Written for commit 898195f. Summary will update on new commits. Review in cubic