feat: add CodeBuddy support - #1581
Conversation
|
Hi @opcode81, would you have a chance to take a look at this PR when you get a moment? All CI checks have passed. Thanks! |
opcode81
left a comment
There was a problem hiding this comment.
Thanks for your contribution.
Please remove CodeBuddy from lists of examples to which it was added, i.e. a list as in "e.g. Claude Code, Codex or Copilot" should not be changed.
Non-exhaustive lists are supposed to contain the most prominent examples only.
Similarly, please move the CodyBuddy section to the end of the clients documentation file.
Address PR review feedback: - Remove all documentation changes (docs/, CHANGELOG.md, README.md) per reviewer request to keep non-exhaustive example lists unchanged and avoid adding CodeBuddy to the clients documentation. - Keep code changes only: ClientSetupHandlerCodeBuddy, hook support for --client=codebuddy, and the codebuddy context.
8e30fbf to
c370b59
Compare
studyzy
left a comment
There was a problem hiding this comment.
Hi @opcode81, thanks for the review.
I've updated the PR per your feedback:
-
Removed CodeBuddy from non-exhaustive example lists — The README.md and other docs no longer list CodeBuddy alongside the prominent clients (Claude Code, Codex, Copilot, etc.).
-
Moved CodeBuddy section to the end of the clients documentation file — The CodeBuddy section now appears before the "Other Clients" catch-all section in
docs/02-usage/030_clients.md. -
No changes to CHANGELOG or other docs — Only
030_clients.mdis modified (alongside the code changes). -
Added CodeBuddy-Code to the Terminal-Based Clients list — With a link to https://www.codebuddy.cn/cli/ in the "Other Clients" section.
The CI failures are pre-existing infrastructure issues unrelated to this PR:
- macos-latest: clangd download timeout (
github.comread timeout 60s) - windows-latest: unrelated test flake
All code-related checks pass (build, lint, CodeQL, spelling, analysis). The 3 code files changed (client_setup.py, hooks.py, codebuddy.yml) are identical to the previous passing CI runs.
This is ready for another review or merge. Thanks!
|
Thank you for addressing the comments, merging |
Summary
This PR adds native support for CodeBuddy as a supported CLI client, alongside existing support for Claude Code and Codex.
CodeBuddy is a CLI coding agent that shares a similar architecture with Claude Code — it supports MCP server configuration, hooks (PostToolUse, Notification, SessionStart, Stop), and the same tool naming conventions (
read,grep,edit, etc.).Changes
New features
ClientSetupHandlerCodeBuddy): Enablesserena setup codebuddyto auto-configure the MCP server. Includes version detection and stderr suppression.contexts/codebuddy.yml): A single-project context that disables overlapping tools (read_file,search_for_pattern,execute_shell_command, etc.) and encourages the agent to prefer Serena's symbolic tools.serena-hooks) to recognize--client=codebuddy, applying the sameremind,activate,cleanup, andauto-approvehooks as Claude Code.Documentation
README.md— added CodeBuddy alongside Claude Code and Codex in client lists.docs/02-usage/030_clients.md— new "CodeBuddy" section with setup instructions (both auto and manual), MCP configuration examples, hook configuration JSON, and hook descriptions.docs/02-usage/020_running.md,docs/02-usage/040_workflow.md,docs/02-usage/050_configuration.md— updated references to include CodeBuddy in lists of single-project contexts and supported clients.CHANGELOG.md— updated a reference to include CodeBuddy in a prior fix note.Bug fixes
is_applicable()checks:execute_shell_command()calls inClaudeCodeandCodexhandlers now usecapture_stderr=True, preventing shell "command not found" errors from leaking to the terminal when a client binary is not installed.--versionoutputs only a version number (e.g."2.106.4") without a recognizable binary name, so the version check only validates the return code rather than parsing stdout content.Files changed
Testing
serena setup codebuddycorrectly detects and configures CodeBuddy.remind,activate,cleanup,auto-approve) function correctly with--client=codebuddy.