# CodeBuddy Code v2.50.6 Release

## Improvements

- **High-risk Command Detection Rules Optimization**: Significantly reduced false positive rates, refined CRITICAL/HIGH/MEDIUM three-tier risk assessment rules. Common development commands like `git restore --staged`, `rm temp.log`, `docker rm`, `kill -9`, etc. are no longer incorrectly blocked, improving daily development workflow
- **Permission Rule Security Layering**: Distinguished allow rules by source into trusted (user settings) and untrusted (project settings), preventing malicious repositories from injecting permission rules through project configuration files to bypass security checks, enhancing supply chain security protection
- **Security Allowlist Expansion**: Added 50+ common development tool commands to the security allowlist, covering build tools, testing frameworks, package managers, code quality tools, and more, reducing unnecessary authorization prompts
- **Sub-agent Model Configuration Optimization**: Added relatedModels configuration for MiniMax-M2.5 and Kimi-K2.5 models, ensuring sub-agents correctly select corresponding lightweight and reasoning model variants when using these models

## Bug Fixes

- **Process Hang Fix**: Fixed an issue where the process would not exit after terminal closure, causing 100% CPU usage
- **Shell Handle Leak Fix**: Fixed multiple Shell execution handles not being properly released, preventing PTY file descriptor leaks
- **node-pty fd Leak Fix**: Detected and closed additional ptmx file descriptors leaked internally by node-pty during dispose
- **Diagnostics Enhancement**: Added Active PTYs count to the /doctor panel for easier detection of potential PTY leaks
