make session TTL configurable via MCP_SESSION_TTL_MS#360
Open
prachishah-harness wants to merge 2 commits into
Open
make session TTL configurable via MCP_SESSION_TTL_MS#360prachishah-harness wants to merge 2 commits into
prachishah-harness wants to merge 2 commits into
Conversation
Replace the hardcoded SESSION_TTL_MS constant (30 min) with a MCP_SESSION_TTL_MS config field defaulting to 5 minutes, so operators can tune idle-session expiry without a code change. Co-authored-by: Cursor <cursoragent@cursor.com>
|
|
…mple entry Co-authored-by: Cursor <cursoragent@cursor.com>
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
SESSION_TTL_MS = 30 * 60_000constant insrc/index.tswith aMCP_SESSION_TTL_MSconfig field (Zod-validated,z.coerce.number().min(1))300000ms).env.examplealongside the other timeout/retry knobsconfig.MCP_SESSION_TTL_MSinsidestartHttp, so it correctly picks up the parsed+validated config rather than a module-level constantTest plan
MCP_SESSION_TTL_MSset — sessions should expire after 5 minutes (new default)MCP_SESSION_TTL_MS=60000and confirm sessions are reaped after 1 minute of inactivityMCP_SESSION_TTL_MS=0and confirm config validation rejects it (min(1))Made with Cursor