π CodeBuddy Code v2.166.0 Release β
π¦ Version Information β
| Component | Version |
|---|---|
| CodeBuddy Code CLI | v2.166.0 |
| Agent SDK JS | v0.3.278 |
| Agent SDK Python | v0.3.277 |
β¨ New Features β
Comprehensive Web UI Interaction Upgrade β
- Per-turn file changes: After each turn in a conversation, the files edited in that turn and their added/removed line counts are shown. Click "View" to open the diff in the right-side workbench and jump to the changed lines. The most recent turn supports one-click undo, and the feature can be turned off at any time under "Settings β Appearance".
- Input box plus menu: Grouped by context, working style, and skills, with support for search, keyboard selection, and mobile use. You can reference workspace files or folders (without changing the working directory or granting access permissions), add attachments while a task is running, and get both Send and Stop buttons when a draft is present.
- Keyboard shortcuts: Supports shortcuts for stopping, switching permission modes, selecting models, toggling thinking, copying the latest reply, expanding task progress, and searching input history. Shortcuts use a separate configuration that can be remapped, unbound, and reset, without affecting terminal shortcuts.
- Interactive pets: Added a Journey to the West pet series (Wukong, Tang Seng, Bajie, Sha Seng, and the White Dragon Horse). Pets change animations with the agent's state; single-click to pet, double-click to say hello, and their eyes follow the mouse. Use
/petsto show, hide, or switch pets. - "My Twin": The main agent has been upgraded to "My Twin", pinned at the top of the agent list. By default it can join rooms and channels, and when a colleague @-mentions it in a channel, the message is forwarded to your main conversation for handling. The avatar library has been redesigned with many new styles, and the list supports "Group by directory".
- Workspace plugins: A new "Workspace Plugins" entry has been added to the input box "+" menu and the agent context menu. You can enable, disable, or add plugins from the marketplace per agent working directory, and restore inheritance of user-level settings with one click.
Longer-Lived Prompt Caching That Saves Credits β
When using built-in models, requests automatically enable a 1-hour prompt cache (previously 5 minutes). In long sessions or scenarios that repeatedly read the same context, repeated content is more likely to hit the cache instead of being billed again in full, noticeably reducing credit consumption. The cache tier is determined at the session's first request and stays fixed. To return to the 5-minute cache, set the environment variable CODEBUDDY_DISABLE_PROMPT_CACHING_1H=1.
Automation and Integrations β
- ACP background task management: ACP clients can list background Bash / PowerShell tasks, query their status and final results, and cancel them by task ID. Hosts can also stop background tasks by session and terminal ID without interrupting the foreground conversation.
- MCP network domain rules: With the sandbox enabled, tool calls to HTTP / SSE / remote MCP servers are evaluated against the Security Center's network domain rules: allowed calls run directly, calls requiring approval show an approval card, and forbidden calls are rejected outright, all recorded in the security audit log.
- stream-json session configuration alignment: When enabled via
CBC_SESSION_CONFIG_SYNC=1, the session context window is validated against the model tier, a new session-level thinking key is added, and thinking and tier settings are automatically corrected after switching models. When unset, behavior is exactly the same as before. - Built-in REPL for the server library: After setting
CODEBUDDY_REPL_ENABLED=1, sessions connected through the server library can execute code (Code Mode).
Mod Ecosystem β
- My Apps: Create, modify, combine, and fix apps in the Web UI using natural language, with no node editor, schema forms, or publishing process required.
- Mod Center: Functional mods and appearance mods are managed together, sharing the list, search, type filters, and AI creation entry. Mod details support viewing saved versions and restoring a specific version, and can export a standard installation package directly (dependencies are bundled; user data is not included).
- Desktop capabilities and UI slots: Mods gain an optional
desktopnamespace (opening links and directories, notifications, terminals, and more). The workbench adds tabs and file previews, and native slots are opened up for the sidebar, background task and subagent details, the agent directory, and more.
π§ Improvements β
- Session history cleanup is now opt-in: The new
CODEBUDDY_SESSION_HISTORY_CLEANUPenvironment variable replaces the old one, and 30-day cleanup runs only when it is explicitly set to1/true. It is enabled by default for interactive launches, while programmatically launched scenarios such as-p/ SDK / ACP keep all history by default. Breaking change: The old variableCODEBUDDY_DISABLE_SESSION_HISTORY_CLEANUPis no longer read; users who used it to disable cleanup should switch toCODEBUDDY_SESSION_HISTORY_CLEANUP=0. - No more startup lag in large directories: When starting in a directory with many subdirectories (such as the user's home directory), background repository discovery now uses an asynchronous, bounded scan, making startup faster and no longer producing large amounts of diagnostic logs.
- Tool concurrency limit: Up to 10 concurrent read-only tool calls can run at the same time within a turn; any beyond that are queued in order. This can be adjusted with
CODEBUDDY_MAX_TOOL_USE_CONCURRENCY. - Bash large output preview: When large output is written to disk, the preview now shows the beginning of the output first on success and keeps the exit code hint on failure, making it quicker to judge command results.
- Improved model request identification and troubleshooting: Model requests now include an
X-Agent-Runtimeruntime form identifier. Custom model failure logs include the upstream request ID, tracing, and rate-limit response headers (credentials are not logged). - Web UI details: In the branch selector, pressing Enter with a Chinese IME now confirms the candidate first. The branch list shows ahead / behind commit counts along with author and commit message. The left navigation adds a "Settings" entry, and avatars prefer showing the real avatar.
- Regression safeguards: Added end-to-end regression tests for key command-line, session, and terminal flows, as well as regression verification for image input and historical sessions.
π Bug Fixes β
--serveinternal API authentication: Fixed a security issue where, when a remote port was exposed, internal APIs could be called without authorization and thereby execute commands with the current user's permissions. With gateway authentication enabled, internal APIs now require credentials just like the public API.- Main Agent mode consistency: Fixed turns triggered by scheduled tasks, follow-up messages received by background sessions, and team lead wake-ups falling back to standard mode and losing custom instructions under PTC, Creator, or custom main Agent modes.
- Tool call order: Fixed calls queued after a call requiring confirmation in the same turn executing before approval. Fixed operations with side effects, such as writing files, editing, and running commands, possibly executing concurrently out of order (read-only calls can still run concurrently).
- Exit code display: When Bash / PowerShell exits with a non-zero exit code, the UI now shows the exit code on the first line of the result, highlighted in an error color.
- MCP tool results: Fixed conversations erroring out and being unable to continue after a lazily loaded MCP connector returned a JSON object. Sessions that already hit this error can continue after being reopened.
- Auto-upgrade: Fixed an interrupted upgrade for npm installations possibly deleting the old version and leaving the command unable to start. Upgrades now download completely before replacing, and are automatically repaired if corrupted.
- Garbled Chinese when copying: Fixed Chinese content copied with
/copyin the macOS desktop app's built-in terminal appearing garbled after pasting. - Background task output and responsiveness: Fixed the last chunk of output possibly being missed when a background command exits. Messages sent while a background task is wrapping up no longer wait until the entire turn finishes to get a response.
- WeCom / WeChat bots: Re-logging in no longer disconnects connected bots; they are automatically restored after re-login. Previously connected bots automatically reconnect across process restarts.
- Web UI connections and pages: Behind a reverse proxy, the UI switches to the real-time channel only after confirming messages can be received, and automatically falls back on failure. Fixed issues such as PTC and other modes displaying incorrectly after a refresh, and the
/btwpage erroring and auto-refreshing. - Image history compatibility: Fixed being unable to continue a conversation with image history after rolling back the CLI version, and images being unreadable when using temporary Q&A such as
/btwafter resuming a session. - Scheduled tasks: Persisted recurring tasks are no longer automatically deleted 3 days after creation; they keep running until manually deleted.
- Sandbox and file approvals: Fixed auto-authorization for old paths continuing to accumulate after deleting or renaming in the macOS sandbox. Fixed deleted files being falsely reported as nonexistent when rerunning a command after a sandbox file approval.
- Other fixes: Faster session title generation; voice transcription correctly displays credit consumption; fixed Read closing the connection when given an invalid path; fixed hook prompts unexpectedly entering the model context; fixed custom model credential fallback and refined the default value strategy, and more.