From 5007a122b27315ce6ccadea6bb588ff72b7140ba Mon Sep 17 00:00:00 2001 From: teknium1 Date: Fri, 27 Feb 2026 03:53:55 -0800 Subject: [PATCH] fix(terminal): enhance error logging in cleanup functions with exception info --- tools/terminal_tool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/terminal_tool.py b/tools/terminal_tool.py index 6bd8411b..e346462b 100644 --- a/tools/terminal_tool.py +++ b/tools/terminal_tool.py @@ -595,7 +595,7 @@ def _cleanup_thread_worker(): config = _get_env_config() _cleanup_inactive_envs(config["lifetime_seconds"]) except Exception as e: - logger.warning("Error in cleanup thread: %s", e) + logger.warning("Error in cleanup thread: %s", e, exc_info=True) for _ in range(60): if not _cleanup_running: @@ -663,7 +663,7 @@ def cleanup_all_environments(): cleanup_vm(task_id) cleaned += 1 except Exception as e: - logger.error("Error cleaning %s: %s", task_id, e) + logger.error("Error cleaning %s: %s", task_id, e, exc_info=True) # Also clean any orphaned directories scratch_dir = _get_scratch_dir()