Skip to content

fix gateway: clear slash confirm state during session boundary cleanup#22510

Merged
ethernet8023 merged 1 commit into
NousResearch:mainfrom
novax635:fix/gateway-slash-confirm-boundary-cleanup
May 9, 2026
Merged

fix gateway: clear slash confirm state during session boundary cleanup#22510
ethernet8023 merged 1 commit into
NousResearch:mainfrom
novax635:fix/gateway-slash-confirm-boundary-cleanup

Conversation

@novax635

@novax635 novax635 commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Clear pending slash-confirm state when the gateway crosses a session boundary.

This fixes a state-leak where a pending /reload-mcp confirmation could survive /new, /resume, or /branch and still be resolved afterward in the reused session key.

Problem

GatewayRunner._clear_session_boundary_security_state() already clears approval, YOLO, pending update-prompt, and skills-reload state, but it did not clear module-level pending state in tools.slash_confirm.

That meant an old slash-confirm prompt could outlive a conversation boundary and trigger side effects in the wrong session context.

Changes

  • Clear tools.slash_confirm pending state inside session-boundary cleanup
  • Extend the session-boundary regression test to cover slash-confirm isolation
  • Verify the target session is cleared while other sessions remain untouched

Testing

  • scripts/run_tests.sh tests/gateway/test_session_boundary_security_state.py

  • 5 passed in 6.25s

@ethernet8023 ethernet8023 merged commit 0cafe7d into NousResearch:main May 9, 2026
11 of 13 checks passed
JinyuID pushed a commit to JinyuID/hermes-agent that referenced this pull request May 11, 2026
…-confirm-boundary-cleanup

fix gateway: clear slash confirm state during session boundary cleanup
jsboige pushed a commit to jsboige/hermes-agent that referenced this pull request May 14, 2026
…-confirm-boundary-cleanup

fix gateway: clear slash confirm state during session boundary cleanup
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request May 25, 2026
…-confirm-boundary-cleanup

fix gateway: clear slash confirm state during session boundary cleanup
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…-confirm-boundary-cleanup

fix gateway: clear slash confirm state during session boundary cleanup
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…-confirm-boundary-cleanup

fix gateway: clear slash confirm state during session boundary cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants