feat: add CodeBuddy support#1581
Open
studyzy wants to merge 3 commits into
Open
Conversation
…applicable() `codebuddy --version` outputs only the version number (e.g. "2.106.4") without the string "CodeBuddy", causing the `is_applicable()` check to return False and setup to fail with "not found or not functional". Checking only the exit code is sufficient to detect the binary.
`is_applicable()` calls `execute_shell_command()` without `capture_stderr=True`, so when a client binary is not installed (e.g. codex), the shell's 'command not found' error leaks directly to the terminal. Pass capture_stderr=True in all three handlers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.