Skip to content

Auto-remove thinking blocks from context #22

@Tarquinen

Description

@Tarquinen

Problem

Thinking blocks (<thinking>...</thinking>) consume significant tokens (often 1-3K+ per response) but are never referenced again after generation.

Proposed Solution

Add deterministic removal of thinking blocks (no LLM analysis needed):

  • Pattern match thinking block formats (XML tags, message part types)
  • Run alongside deduplication in Phase 1
  • Config: removeThinkingBlocks: boolean (default: true)

Could save 5K-30K tokens in typical sessions with extended thinking enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions