# CodeBuddy Code v2.49.0 Release

## New Features

### Usage Insights Report

Added the `/insights` command to generate AI-driven usage insight analysis reports. Reports cover multiple dimensions including interaction style, project domain, friction points, highlights, and improvement suggestions, helping you better understand and optimize your AI collaboration patterns. Supports viewing HTML-formatted visual reports in the browser.

## Improvements

- **Statistics Accuracy**: Optimized token usage statistics logic to correctly distinguish between main session and sub-agent sessions; fixed token omission in tool calls
- **Progress Display**: Supports custom progress text, showing real-time processing progress in loading state
- **Custom Model Configuration**: Fixed the issue where custom models incorrectly inherited global associated model configurations, ensuring behavior matches expectations
- **Memory System**: Optimized memory context prompts, streamlined wording, and added implicit memory source support to improve cross-session memory recall
- **Multi-language Support Enhancement**: All sub-agents now correctly follow the user's language settings when responding
- **UI Refresh Optimization**: Optimized terminal refresh strategy after tool execution completion, added debounce mechanism to reduce unnecessary rendering
- **Memory Optimization**: Automatically releases session history and references after sub-agent tasks complete, reducing memory usage
- **Grep Search**: Automatically corrects search pattern parameters to avoid unnecessary call failures; compatible with ripgrep regex syntax
- **File Reading**: Returns directory listing when reading a directory, helping quickly locate target files

## Bug Fixes

- **Tool Error Handling**: Improved error messages and handling logic when tools are not found
- **Headless Mode**: Fixed the issue where streaming output blocked when using non-default agents, ensuring completion signals are correctly sent
- **Tool Result Display**: Fixed the issue where output from Edit and other tools was not displayed after execution, requiring manual terminal resize to see results
- **Session Resume List**: Removed unnecessary agent type filtering from the session resume panel, allowing all valid sessions to be resumed
