Skip to content

feat: add CodeBuddy agent support#115

Merged
KokaKiwi merged 5 commits into
edgee-ai:mainfrom
studyzy:feat/codebuddy-agent
Jul 1, 2026
Merged

feat: add CodeBuddy agent support#115
KokaKiwi merged 5 commits into
edgee-ai:mainfrom
studyzy:feat/codebuddy-agent

Conversation

@studyzy

@studyzy studyzy commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

Adds CodeBuddy as a launchable coding agent alongside Claude Code, Codex, and OpenCode. edgee launch codebuddy starts a local Edgee gateway and routes CodeBuddy's traffic through it via the CODEBUDDY_BASE_URL env var.

Motivation

CodeBuddy is an Anthropic Messages API-compatible coding agent. The local-gateway flow lets Edgee apply its tool-output compression to CodeBuddy sessions, matching what's already available for Claude Code / Codex / OpenCode. The implementation mirrors the headroom project's codebuddy provider.

Changes

  • New launch subcommand: edgee launch codebuddy (local-gateway only). Sets CODEBUDDY_BASE_URL to the local gateway address so CodeBuddy's /v1/messages requests flow through Edgee's compression pipeline.
  • Provider registration:
    • config.rs: added codebuddy field to Profile.
    • auth/login.rs: added codebuddy to agent_label, coding_assistant_name, provider_config_mut, provider_config.
    • settings.rs: added codebuddy to PROVIDERS (routing not enabled, same as opencode).
    • alias.rs: added Codebuddy variant to Agent enum + CODEBUDDY_ALIAS spec; edgee alias now installs a codebuddy shim too.
  • Statusline: reuses Claude's ensure_first_run_installed() on first launch (consistent with codex/opencode).
  • Docs: updated README (quickstart, alias section, supported-setups matrix), CLAUDE.md, doc/architecture.md, and the compression-layer / gateway-core crate READMEs.

Hosted mode is intentionally not supported yet — there's no documented way to inject Edgee's x-edgee-api-key / x-edgee-session-id headers into CodeBuddy's outbound requests. Only the --local-gateway flow is wired up.

Testing

  • cargo fmt --all -- --check passes
  • cargo clippy --workspace -- -D warnings passes (no issues)
  • cargo test --all passes (578 passed, 0 failed)
  • New unit-test assertions for codebuddy in auth/login.rs and alias.rs
  • cargo check passes

Checklist

  • Code follows project style guidelines (gofmt-equivalent: cargo fmt)
  • Self-reviewed the code
  • Added tests for new functionality
  • Updated documentation
  • CI checks pass locally

Adds CodeBuddy as a launchable coding agent alongside Claude Code, Codex, and OpenCode.

CodeBuddy routes its Anthropic Messages API traffic through a local Edgee gateway via the CODEBUDDY_BASE_URL env var, mirroring the headroom project's codebuddy provider. Hosted mode is not yet supported (no documented header injection mechanism); only --local-gateway flow is wired up.

Changes:

- New launch subcommand: edgee launch codebuddy (local-gateway only)

- Registered codebuddy provider in config Profile, auth login mappings, settings PROVIDERS, and alias Agent enum

- Reuses Claude statusline auto-install on first launch (consistent with codex/opencode)

- Updated README, CLAUDE.md, architecture.md, and crate READMEs
@studyzy studyzy requested a review from a team as a code owner June 23, 2026 08:36
@SachaMorard SachaMorard requested a review from KokaKiwi June 24, 2026 04:51
@SachaMorard SachaMorard added the good first issue Good for newcomers label Jun 24, 2026
Comment thread crates/cli/src/commands/launch/codebuddy.rs
Comment thread crates/cli/src/commands/launch/codebuddy.rs Outdated
Comment thread README.md Outdated
@KokaKiwi

KokaKiwi commented Jun 30, 2026

Copy link
Copy Markdown
Member

The agent registration plumbing (alias, auth, settings, config, docs) is clean and consistent. Two blockers before this can merge: codebuddy::run skips the entire auth/provisioning flow and launches the local gateway unconditionally, with no hosted/local branch like the other launchers, and CodeBuddy's documentation confirms it uses the OpenAI Chat Completions format rather than the Anthropic Messages API.

…debuddy launcher

Mirror codex.rs structure: add --local-gateway flag, perform_login,
ensure_org_selected, ensure_valid_provider_key/ensure_onboarded for
codebuddy, connection default, hosted path with CODEBUDDY_BASE_URL
and CODEBUDDY_CUSTOM_HEADERS, print_session_stats on exit.

Previously codebuddy.rs only had local-gateway path with no auth
sequence, meaning edgee launch codebuddy would bypass authentication
and session tracking entirely.

Addresses PR #115 review feedback from @KokaKiwi.
@studyzy studyzy force-pushed the feat/codebuddy-agent branch from d492f17 to 3b5934f Compare July 1, 2026 03:09
…l, Cargo.lock

Also update README alias count from 'all three' to 'all five' to cover
claude, codebuddy, codex, opencode, and crush.
@studyzy studyzy force-pushed the feat/codebuddy-agent branch from 3b5934f to 597bcb0 Compare July 1, 2026 03:12
Resolve conflicts in 5 files - keep codebuddy additions from feat branch
@KokaKiwi KokaKiwi merged commit 43941f8 into edgee-ai:main Jul 1, 2026
4 checks passed
@KokaKiwi

KokaKiwi commented Jul 1, 2026

Copy link
Copy Markdown
Member

Thanks for the contribution and for adding CodeBuddy agent support 🙂
Really appreciate the work here, this is a nice addition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants