diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ba9dcbb..8f752a13c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,7 @@ Docs: https://docs.openclaw.ai - Gateway/hooks: bucket hook auth failures by forwarded client IP behind trusted proxies and warn when `hooks.allowedAgentIds` leaves hook routing unrestricted. - Agents/compaction: skip the post-compaction `cache-ttl` marker write when a compaction completed in the same attempt, preventing the next turn from immediately triggering a second tiny compaction. (#28548) thanks @MoerAI. - Native chat/macOS: add `/new`, `/reset`, and `/clear` reset triggers, keep shared main-session aliases aligned, and ignore stale model-selection completions so native chat state stays in sync across reset and fast model changes. (#10898) Thanks @Nachx639. +- Agents/compaction safeguard: route missing-model and missing-API-key cancellation warnings through the shared subsystem logger so they land in structured and file logs. (#9974) Thanks @dinakars777. ## 2026.3.11 diff --git a/src/agents/pi-extensions/compaction-safeguard.ts b/src/agents/pi-extensions/compaction-safeguard.ts index 7eb2cc293..6012aed60 100644 --- a/src/agents/pi-extensions/compaction-safeguard.ts +++ b/src/agents/pi-extensions/compaction-safeguard.ts @@ -726,7 +726,7 @@ export default function compactionSafeguardExtension(api: ExtensionAPI): void { // Use a WeakSet to track which session managers have already logged the warning. if (!ctx.model && !runtime?.model && !missedModelWarningSessions.has(ctx.sessionManager)) { missedModelWarningSessions.add(ctx.sessionManager); - console.warn( + log.warn( "[compaction-safeguard] Both ctx.model and runtime.model are undefined. " + "Compaction summarization will not run. This indicates extensionRunner.initialize() " + "was not called and model was not passed through runtime registry.", @@ -737,7 +737,7 @@ export default function compactionSafeguardExtension(api: ExtensionAPI): void { const apiKey = await ctx.modelRegistry.getApiKey(model); if (!apiKey) { - console.warn( + log.warn( "Compaction safeguard: no API key available; cancelling compaction to preserve history.", ); return { cancel: true };