Skip to content

Conversation

@Tarquinen
Copy link
Collaborator

Summary

This release focuses on improving the idle pruning mechanism and context_pruning tool reliability:

  • Fix redundant idle pruning — Skip idle pruning immediately after context_pruning tool when their strategies overlap, avoiding duplicate work
  • Prevent premature re-nudging — Reset nudge counters after context_pruning and idle pruning to avoid bombarding users with repeated pruning prompts
  • Fix skipNextIdle flag reset bug — Prevent the flag from being incorrectly reset when tool results lack a name field
  • Improve defaults — Increase nudge_freq from 5 to 10 for better user experience
  • Better prompt guidance — Emphasize distillation requirement and prevent model from acknowledging invisible system instructions
  • Remove CLAUDE.md — Consolidate configuration

Changes

  • lib/hooks.ts: Core idle pruning logic improvements
  • lib/pruning-tool.ts: Better counter management after pruning
  • lib/config.ts: Increased default nudge_freq
  • lib/prompts/tool.txt: Clearer distillation requirements
  • lib/synth-instruction.ts: Prevent instruction acknowledgment
  • README.md: Improved clarity and updated examples

Anthropic tool_result and OpenAI Responses function_call_output don't
include a name field - only the tool call ID. The check for
'context_pruning' was comparing undefined !== 'context_pruning', always
returning true and resetting skipNextIdle immediately after it was set.

Added getToolName lookup function to ToolTracker that retrieves the tool
name from the cached toolParameters using the call ID.
@Tarquinen Tarquinen merged commit 50c08ef into master Nov 30, 2025
1 check passed
@Tarquinen Tarquinen deleted the fix/idle-pruning-optimizations branch November 30, 2025 04:14
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