idle_timeout parameter in metadata (unit: seconds, minimum is 60) to enable the “Idle Timeout” feature. Once enabled, when the system detects that the sandbox has no operations (executing commands, running code, file operations, etc.) within the specified time range, the system will kill the sandbox instance. Otherwise, the sandbox will continue to run until it reaches the maximum time limit for sandbox operation (currently default is 3600 seconds).
Please refer to the following example: