fix(core): ensure sub-agent schema and prompt refresh during runtime (#16409)

Co-authored-by: Sehoon Shon <sshon@google.com>
This commit is contained in:
Adam Weidman
2026-01-12 12:11:24 -05:00
committed by GitHub
parent 950244f6b0
commit 465ec9759d
7 changed files with 101 additions and 16 deletions

View File

@@ -65,6 +65,14 @@ export async function runExitCleanup() {
}
cleanupFunctions.length = 0; // Clear the array
if (configForTelemetry) {
try {
await configForTelemetry.dispose();
} catch (_) {
// Ignore errors during disposal
}
}
// IMPORTANT: Shutdown telemetry AFTER all other cleanup functions have run
// This ensures SessionEnd hooks and other telemetry are properly flushed
if (configForTelemetry && isTelemetrySdkInitialized()) {