diff --git a/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts b/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts index 79e5b75f5d69f..f9202f1472e81 100644 --- a/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts +++ b/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts @@ -1395,8 +1395,11 @@ export class RunInTerminalTool extends Disposable implements IToolImpl { } }); // Register a listener to notify the agent when commands complete in this - // background terminal, and continue the output monitor for prompt-for-input detection - if (this._configurationService.getValue(TerminalChatAgentToolsSettingId.BackgroundNotifications)) { + // background terminal, and continue the output monitor for prompt-for-input detection. + // Skip notifications for subagent-initiated terminals: the subagent runs in its + // own tool calling loop and cannot receive steering messages. It can poll with + // get_terminal_output instead. + if (this._configurationService.getValue(TerminalChatAgentToolsSettingId.BackgroundNotifications) && !invocation.subAgentInvocationId) { this._registerCompletionNotification(toolTerminal.instance, termId, chatSessionResource, command, outputMonitor); } else { outputMonitor?.dispose();