diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 30dd126c8..964c07c0f 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog ## [Unreleased] +### Fixed + +- Fixed completion notification to only send when interactive mode is in foreground +- Improved completion notification message to include session title when available ## [3.35.0] - 2026-01-09 ### Added diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts index c3569f1cb..457205ca2 100644 --- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts @@ -1484,11 +1484,14 @@ export class InteractiveMode { } private sendCompletionNotification(): void { + if (this.isBackgrounded === false) return; if (isNotificationSuppressed()) return; const method = this.settingsManager.getNotificationOnComplete(); if (method === "off") return; const protocol = method === "auto" ? detectNotificationProtocol() : method; - sendNotification(protocol, "Agent complete"); + const title = this.sessionManager.getSessionTitle(); + const message = title ? `${title}: Complete` : "Complete"; + sendNotification(protocol, message); } /** Extract text content from a user message */