Skip to content

Add configurable protection for most recent N tool calls #46

@Tarquinen

Description

@Tarquinen

Summary

Add a config option to protect the most recent N tool calls from being pruned by AI analysis, while still allowing deduplication.

Proposed Config

{
  "protectRecentTools": 5  // Last 5 tool calls protected from AI pruning
}

Rationale

Recent tool outputs are more likely to be contextually relevant. This provides a safeguard independent of semantic analysis, while still allowing deduplication to remove obvious duplicates.

Implementation Notes

  • Apply filter in janitor.ts after deduplication phase, before AI analysis
  • Deduplication should still be allowed to prune within the last N tools
  • Should work alongside existing protectedTools array

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions