Add client-side timeout validation to browser session creation#1
Draft
Copilot wants to merge 2 commits into
Draft
Add client-side timeout validation to browser session creation#1Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/sudiptap-cpu/skyvern/sessions/9dece6e4-671a-46e8-9475-d8960d989054 Co-authored-by: sudiptap-cpu <250333639+sudiptap-cpu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update session management for user application
Add client-side timeout validation to browser session creation
Apr 9, 2026
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.
do_session_createaccepted any integer fortimeoutdespite the documented valid range of 5–1440 minutes, with no client-side enforcement. Out-of-range values were silently passed to the API, and theValueErrorhandler inskyvern_browser_session_creategave a misleading "Cloud sessions require SKYVERN_API_KEY" hint regardless of the actual error.Additionally,
timeout or 60silently coercedtimeout=0to60, bypassing any validation entirely.Changes
session_ops.py— AddSESSION_TIMEOUT_MIN = 5/SESSION_TIMEOUT_MAX = 1440constants; raiseValueErrorindo_session_createwhen timeout is out of range (validation skipped for local sessions, which have no server-enforced timeout)mcp_tools/session.py— Fixtimeout or 60→timeout if timeout is not None else 60so zero/explicit values aren't silently promoted; changeValueErrorhandler error code fromSDK_ERROR→INVALID_INPUTwith a useful hint covering both timeout range and missing API key casestest_cli_shared_core.py(4 tests) andtest_mcp_session_lifecycle.py(2 tests)Original prompt
Created from VS Code.