Repository navigation
Expire idle local MCP sessions - #2602
Open
kunaaaalcodes wants to merge 1 commit into
Open
kunaaaalcodes wants to merge 1 commit into
kunaaaalcodes wants to merge 1 commit into
Conversation
Add an on-access idle TTL for local MCP sessions, configurable with EXECUTOR_MCP_SESSION_IDLE_TTL_MS and defaulting to 30 minutes. Add focused local e2e coverage for expiry and refresh. Release-note: Fix: Local MCP sessions now expire after being idle.
This branch has not been deployed
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
The local daemon reused MCP sessions without an idle lifetime, so a valid
mcp-session-idcould remain usable indefinitely. This change adds a local idle-expiration guard: sessions past their TTL are no longer accepted and get the MCP-compatible404 Session not foundresponse used for unknown or expired sessions.Fixes #2598
What changed
mcp-session-idin the local MCP handler.EXECUTOR_MCP_SESSION_IDLE_TTL_MS(milliseconds), with a 30-minute default.originfromstartLocalProductso e2e tests can call the local product directly over HTTP.Behavior
404with JSON-RPC error code-32600Scope
Limited to the local daemon path described in #2598. Self-host and cloud MCP session handling already have their own bounded/expiring session behavior and are unchanged.
Tests
Added focused local e2e coverage in
e2e/tests/local-mcp-session-idle.spec.ts:Checks run locally
git diff --checkpr:check