# 🚀 CodeBuddy Code v2.100.0 Release

## 📦 Version Information

| Component | Version |
|-----------|---------|
| CodeBuddy Code CLI | v2.100.0 |
| Agent SDK JS | v0.3.160 |
| Agent SDK Python | v0.3.159 |

## ✨ New Features

### WaitForMcpServers Tool

New built-in tool that allows the model to proactively wait for MCP servers that are still connecting. When an MCP server has not yet finished connecting, the model can invoke this tool to wait (up to 5 seconds); once the server connects successfully, its tools are automatically injected into the tool list. Supports waiting for specific servers or all pending servers, and returns each server's connection status (connected / failed / requires authentication / disabled / unknown), making "on-demand invocation" of MCP tools more reliable.

### Safety Review Content Removal

When the model terminates the current response due to safety review, the answer and thinking content produced this turn will be removed from the effective conversation and no longer sent back to subsequent requests, preventing context pollution. A safety review notice placeholder is kept in the session history, so replay and display remain consistent.

## 🔧 Improvements

- **WebFetch Acceleration**: Remote API and local fetch are changed from the previous serial fallback to concurrent competition. When the remote wins, the local request is automatically cancelled, reducing worst-case latency from 50s to about 30s. A 15-minute result cache is also introduced, skipping network requests on cache hits
- **WebFetch Size Control**: Remote API caps the maximum returned content at 100K characters; content exceeding 15K characters automatically triggers AI summarization to reduce conversation context usage
- **WebFetch Observability**: Added structured `webfetch.complete` / `webfetch.failed` telemetry events, covering source (cache / api / local), status code, latency, content length, and other fields, making it easier to configure alerts based on log levels
- **ToolSearch Connection Hints**: When MCP server configurations exist but are not yet connected, search results proactively hint "still connecting, you can call WaitForMcpServers to wait", guiding the model to the wait flow
- **Bash Sandbox Approval Decoupling**: The sandbox approval orchestration logic is split into three independent stages — SafetyFilter pass-through / Bypass auto-approval / UI escalation — while external behavior remains fully unchanged (sensitive command descriptions, 120-second timeout fallback, cross sub-session backtracking to the main session, etc.)
- **Bash Context Environment Variables**: The Bash tool's subprocess now automatically passes through `$CODEBUDDY_PROJECT_DIR` / `$CODEBUDDY_SESSION_ID` (and compatible aliases), making it easier for skills and user scripts to read project context, consistent with the hook environment
- **IOA Model Updates**: Added two long-context base models, removed 6 legacy models, and upgraded the default reasoning model version

## 🐛 Bug Fixes

- **AskUserQuestion Tool Hang**: Fixed an occasional permanent hang in tool invocation. Added a 10-minute timeout fallback and single-waiter routing fallback to prevent the tool from not returning after the user answers in scenarios where UI messages are lost or routing splits
- **Approval Dialog Accidentally Consuming Enter**: Fixed an issue where, with two consecutive approval dialogs, the Enter key for the first one was mistakenly consumed by the new dialog, causing "auto-approve/reject". Added an 80ms focus grace period after the new dialog mounts
- **ExitPlanMode Accidental Approval**: Fixed an issue where pressing Enter could accidentally approve an unread plan while plan content was still loading (UI showing "Loading plan..."). The panel layer now disables focus until plan content is ready
- **Cache Hit Rate Statistics**: Fixed an issue where cache hit rate was counted as 0 when using OpenAI-compatible protocols such as GLM and DeepSeek. Cache read/write tokens can now be correctly reported under all supported protocols
- **Intranet Environment Authentication**: Fixed an issue where API Keys occasionally returned 401 when switching between IOA and intranet environments; also differentiates "built-in model request routing exception" from "custom model key configuration error", providing more accurate troubleshooting guidance
- **MCP Tool Image Recognition**: Fixed an issue where images returned by some MCP tools (such as screenshot tools) could not be recognized by the model and were only received as text. The model can now properly "see" images returned by tools

## 📝 Documentation Updates

- **CLI Doc Archival**: Completed Chinese-English sync of v2.99.1 release notes; `env-vars.md` incremental translation synced to the English version (added `CODEBUDDY_WAIT_FOR_MCP_SERVERS_ENABLED` entry); all three navigation configurations (cliConfig / cliConfigCN / cliConfigZh) stay in sync
