Prerequisites
- A running training job with an interactive session. See Session configuration to add one.
- The Baseten CLI with uv on your
PATH. Thebaseten trusscommands on this page fetch Truss through uv.
Check session status
To see each replica’s live session, auth URL, and expiry, run:REPLICA, SESSION, AUTH URL, and EXPIRES. EXPIRES stays empty until the tunnel authenticates. If no session is live, it prints No interactive sessions found.
To print each replica’s auth code as well, run:
Session expiry
A session expirestimeout_minutes after it starts. The default is 480 minutes, or 8 hours.
To choose the length before you push the job, set timeout_minutes on the job’s InteractiveSession; see Configure an interactive session for the CLI and SDK examples. Set it to -1 to extend the expiry to 10 years. baseten train workstation create sets neither, so a workstation’s session uses the default.
How the expiry behaves depends on the session type:
When the expiry passes, Baseten signals the container to shut down gracefully, and you lose everything in the container’s local filesystem. Where your work survives depends on the job’s configuration: a job with
cache_config enabled has $BT_PROJECT_CACHE_DIR, and a job with checkpointing enabled has $BT_CHECKPOINT_DIR, which Baseten syncs to storage. A job with neither has no persistent directory in the container, so copy out the files you want to keep before the expiry.
Change the session trigger
The Baseten CLI has no command that changes a session’s trigger or timeout. The commands on this page with thebaseten truss prefix run the Truss CLI with your Baseten CLI login.
These commands reach remote tunnel sessions only. For a job with an SSH session, they print No auth codes found for this job.
To change the trigger on a running job, for example to activate an on_demand session, run:
✓ Successfully updated 1 session(s) when it changes the session. You can’t change the trigger of an on_startup session.
Extend a session
To add minutes to a remote tunnel session’s expiry, run:✓ Successfully updated 1 session(s). Baseten sets an SSH session’s expiry when the session starts, so set timeout_minutes before you push the job instead; see Session expiry.
Next steps
- Monitor training jobs: Stream a job’s logs while you work in a session.
- Stop or recreate a job: Stop the job when you finish, so it stops billing.