Improve session flow recovery and reduce audit noise#496
Merged
dmoliveira merged 11 commits intomainfrom Mar 20, 2026
Merged
Conversation
Reduce silent stalls by keeping watchdog progress pulses in visible output, auto-rerouting protected-branch mutations to the maintenance helper, and tightening idle/session recovery plus auto-slash diagnostics gating.
Reduce repeated helper churn by normalizing cache keys across PR-body evidence, done-proof checks, delegation fallback routing, agent routing, and denied-tool inference hooks.
Reduce repeated continuation classifier churn by switching the todo-continuation fallback cache key to the shared compact decision-key builder.
Reduce audit noise by emitting a single state event for deferred shadow-mode LLM decisions instead of recording both decision and shadow-deferred entries for the same outcome.
Trim high-frequency skip audits from healthy watchdog and recovery paths so event logs stay focused on actionable warnings, recoveries, and failures.
Reduce decision-runtime event noise by dropping routine skip audits for nested-child, cooldown, and max-concurrency short-circuits while keeping request, cache-hit, success, and failure telemetry.
Reduce continuation-loop log noise by dropping routine idle skip events that occur during healthy no-op checks while keeping actual loop state transitions and injections visible.
Reduce preemptive-compaction event noise by dropping routine cooldown and token-delta skip audits while preserving missing-metadata, success, and failure signals.
Reduce repeated healthy-state log churn across continuation enforcement, context monitoring, long-turn watchdog, and token-limit recovery while preserving meaningful failures, injections, and blocked actions.
Update config-load assertions to match the intentional long-turn watchdog defaults so the full gateway-core suite stays green after the session-flow hardening changes.
Keep the gateway command output and handbook examples consistent with the hardened long-turn watchdog defaults so operators see the same thresholds everywhere.
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
/doctorauto-routingValidation
npm --prefix plugin/gateway-core run lintnpm --prefix plugin/gateway-core testnode --test plugin/gateway-core/test/long-turn-watchdog-hook.test.mjs plugin/gateway-core/test/session-recovery-hook.test.mjs plugin/gateway-core/test/workflow-conformance-guard-hook.test.mjs plugin/gateway-core/test/primary-worktree-guard-hook.test.mjs plugin/gateway-core/test/auto-slash-command-hook.test.mjs