Skip to content

Conversation

@Tarquinen
Copy link
Collaborator

Summary

  • Fix pruning notifications to preserve the current agent context (e.g., "build") when sending messages, ensuring notifications appear correctly within the agent's message flow.

Changes

  • Extract current agent from the last user message in the session
  • Pass agent parameter through the notification chain (sendMinimalNotification, sendAutoModeNotification, sendHybridNotification)
  • Include agent in the session.prompt call via sendIgnoredMessage

When the context_pruning tool or idle pruning runs while an agent (such as
'build') is active, the notification message should be sent with the same
agent context. This prevents the notification from incorrectly appearing
outside the agent's message flow.

The fix extracts the current agent from the last user message and passes
it through the notification chain to sendIgnoredMessage, which includes
it in the session.prompt call.
@Tarquinen Tarquinen merged commit eb37c5e into master Nov 30, 2025
1 check passed
@Tarquinen Tarquinen deleted the fix/preserve-agent-context-in-pruning-notifications branch November 30, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants