Skip to content

Conversation

@spoons-and-mirrors
Copy link
Collaborator

Summary

  • Added a new Recall system alongside the existing Nudge mechanism.
  • Recall injects a prompt every N messages (configurable via strategies.pruneTool.recall.frequency) asking the agent to summarize accumulated knowledge and progress.
  • Implemented recallCounter in session state to track frequency independently.
  • Unlike Nudge (which persists until a prune occurs), Recall triggers once at the threshold and resets, ensuring periodic prompts without repetition per message.
  • Full configuration support added to lib/config.ts and lib/state.

Implementation Details

  • Config: Added recall object (enabled, frequency) to PruneTool configuration.
  • State: Added recallCounter to session state. It increments alongside nudgeCounter on tool usage and resets on prune actions.
  • Injection: In lib/messages/prune.ts, the recall prompt is injected when the counter meets the frequency threshold. The counter is immediately reset to 0 to create a periodic interval (e.g., every 10 messages) rather than a persistent state.
  • Prompts: Added lib/prompts/recall.txt with the system instruction for summarization.

@spoons-and-mirrors spoons-and-mirrors marked this pull request as draft December 16, 2025 00:18
@spoons-and-mirrors
Copy link
Collaborator Author

deprecated by the better extract tool approach

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