Skip to content

Conversation

@Tarquinen
Copy link
Collaborator

Summary

  • Fix agent detection in prune tool for consistent notifications between manual and GC pruning
  • Refactor to fetch messages once and reuse for both agent detection and token calculation

Closes #70

The prune tool was not detecting the current agent for notifications,
causing inconsistent behavior between manual pruning and GC pruning.

- Fetch messages once and reuse for both agent detection and token calc
- Add findCurrentAgent() to match janitor.ts logic
- Refactor calculateTokensSaved to use pre-fetched messages
- Pass currentAgent to sendUnifiedNotification()

Closes #70
@Tarquinen Tarquinen merged commit 6311141 into master Dec 4, 2025
1 check passed
@Tarquinen Tarquinen deleted the fix/prune-tool-agent-detection branch December 4, 2025 17: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.

prune tool changes agent

2 participants