fix: Kernel restart hanging (#22)

* Add kernel restart command as this is necessary when updated existing package versions * Fix restart command hanging due to leaked ColabRuntime

jacktday committed May 29, 2026 at 06:47 UTC 9dfd38f170b36bd004f0116d2d5c82d0ed280352
1 file changed +4 -1
src/colab_cli/commands/session.py
+4 -1
@@ -274,7 +274,10 @@ def restart(
274 on_session_started=on_sess_started,
275 )
276
277 - runtime.restart(timeout=INTERACTIVE_AUTOMATION_TIMEOUT_SEC)
277 + try:
278 + runtime.restart()
279 + finally:
280 + runtime.stop()
281
282
283 def sessions_command():