# 🚀 CodeBuddy Code v2.103.0 Release

## 📦 Version Information

| Component | Version |
|-----------|---------|
| CodeBuddy Code CLI | v2.103.0 |
| Agent SDK JS | v0.3.165 |
| Agent SDK Python | v0.3.164 |

## ✨ New Features

### DeepSeek V4 Model Support

Added two new reasoning models, DeepSeek V4 Pro and Flash, both supporting a 1M context window, tool calling, and image understanding, further enriching the available base model matrix.

### Doctor Diagnostic Panel Enhancements

The `/doctor` diagnostic panel now displays Session ID, Trace ID, and Request ID, allowing one-click copying of localization clues to the backend for troubleshooting when issues arise, significantly shortening the time to diagnose problems.

## 🔧 Improvements

- **Standardized Debug Environment Variables**: Unified use of `CODEBUDDY_DEBUG` / `CODEBUDDY_DEBUG_SDK` to replace the old `DEBUG` / `DEBUG_SDK`, avoiding conflicts with third-party libraries that use the same environment variable names.
- **Persistent Trace ID Display**: Added the `lastConversationTraceId` field to ensure that the diagnostic panel can still show the most recent Trace ID across conversation turns, making it easier to look up when reproducing issues.
- **Telemetry Error Code Alignment**: The `messageErrorCode` in chat telemetry events is now aligned with the legacy data convention, using a 10-level priority chain to map raw errors to business error codes, ensuring consistent reporting metrics.
- **Refined Model Switch Configuration**: Each model independently declares `relatedModels.lite` / `relatedModels.reasoning`, removing the global fallback that no longer covered new model scenarios, ensuring each model jumps to the expected target model when switching between lite / reasoning.
- **Configurable Sandbox Approval Timeout**: Added the `CBC_SANDBOX_APPROVAL_TIMEOUT_MS` environment variable, making it easier to customize the sandbox permission interception wait timeout for testing and debugging (default 120000ms).

## 🐛 Bug Fixes

- **Sandbox Timeout Dialog Not Closing**: Fixed an issue where, after the sandbox permission interception timed out and auto-rejected, the Desktop / Web UI dialog did not close in sync; the timeout rejection now broadcasts a `permissionResolved` event, and the frontend correctly clears the dialog state upon receipt.
- **Performance Issues Caused by Thinking Intensity Sync**: Fixed an issue where, after the client opened a session, an ACP feedback loop formed between the renderer and the CLI, causing `session/set_config_option` to be called 200+ times within 1.4 seconds and per-session logs to balloon to hundreds of MB. The event source now deduplicates adjacent same-value broadcasts by `(config item, value)`, preventing any client (including older versions without idempotent deduplication) from triggering duplicate pushes.
- **Compact Boundary Message Restoration Anomaly**: Fixed issues where, when restarting a session after compaction, the boundary message replay was abnormal, causing the frontend to miss the compact divider and history to incorrectly modify parent-child links. Compact boundary messages now dispatch an `agent_message_chunk` with a meta marker so the frontend correctly renders the divider; history rebuild only performs corrections on recoverable compact messages.
- **Path Hyperlink Misidentification**: In markdown output, POSIX paths are now proactively wrapped with OSC 8 hyperlinks to prevent terminals like VS Code / iTerm2 from treating prefix CJK characters as part of the URL in mixed Chinese-English scenarios (e.g., "根因: /data/foo" being misidentified as "因: /data/foo"). Cmd / Ctrl+Click can now precisely jump to the target file, and supports `:line[:col]` anchors.
- **Backspace Key Compatibility**: In environments such as iTerm2 / VS Code built-in terminals that send ⌫ as `\x7f`, pressing Backspace now correctly deletes the character to the left, no longer falling through to the "delete forward" branch.
- **ACP Authentication Recovery Experience**: Improved exception reporting and recovery hints after ACP authentication loss, avoiding incomplete error states reaching the client.
- **Telemetry Request ID Consistency**: Simplified the conversation request ID handling logic, unifying its generation source and removing redundant fallback branches to avoid affecting the consistency of reported data.
