feat(truss): supporting updating an interactive session to have an infinite timeout#2237
Open
feat(truss): supporting updating an interactive session to have an infinite timeout#2237
Conversation
…n expiry Adds interactive session timeout extension via `truss train isession --bump`, with a new API method for PATCH-ing session expiry and an "Expires In" column in the isession table display.
…pdate Align CLI with the updated PATCH interactive session endpoint: send timeout_minutes instead of computing expires_at client-side, surface the backend's response message per replica, and rename the flag from --bump to --update for clarity.
Separate timeout and trigger updates into distinct CLI flags. --update-timeout (or --timeout-minutes) handles timeout extension with wizard fallback. --update-trigger sets the session trigger with client-side validation rejecting changes on on_startup sessions.
Remove InquirerPy interactive picker and _update_session_timeout in favor of direct --timeout-minutes and --update-trigger flags. Both flags can be combined in a single call with a shared _patch_sessions helper.
Co-authored-by: Cursor <cursoragent@cursor.com>
rcano-baseten
approved these changes
Feb 19, 2026
Contributor
rcano-baseten
left a comment
There was a problem hiding this comment.
pls address the ONE_YEAR_SECONDS comment
Comment on lines
+301
to
+303
| if total_seconds > _ONE_YEAR_SECONDS: | ||
| return "No timeout" | ||
|
|
Contributor
There was a problem hiding this comment.
would it be more robust for us to look at the timeout_minutes on the session and then pass in a bool flag that says "has_no_timeout"?
| and timeout_minutes < 0 | ||
| ): | ||
| error_console.print( | ||
| '--update-timeout must be "infinite" or a non-negative integer.' |
Contributor
There was a problem hiding this comment.
it can also be -1 - we might want to say that as well
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.
🚀 What
Adds support for infinite timeout (
-1) on interactive sessions, both at job creation and via the CLI update command.--update-timeoutnow acceptsinf/infinity(case-insensitive) in addition to integer minutesInteractiveSession(timeout_minutes="inf")ortimeout_minutes=INTERACTIVE_SESSION_TIMEOUT_INFINITEwhen defining a job💻 How
_TimeoutType) parses string aliases (inf,infinity,infinite, etc.) to-1beforevalidator onInteractiveSession.timeout_minutescoerces the same aliases, with range validation (-1or1–5266080)_format_time_until_expirytreats expiry >1 year away as "No timeout"INTERACTIVE_SESSION_TIMEOUT_INFINITEandInteractiveSessionfromtruss_trainpublic API🔬 Testing
truss train isession --job-id <id> --update-timeout inf)_format_time_until_expirycovering infinite timeout (10-year expiry), boundary cases