Skip to content

fix(desktop): enable buzz-dev-mcp MCP server for Codex agents#1394

Merged
wpfleger96 merged 1 commit into
mainfrom
duncan/codex-mcp-env-forward
Jun 30, 2026
Merged

fix(desktop): enable buzz-dev-mcp MCP server for Codex agents#1394
wpfleger96 merged 1 commit into
mainfrom
duncan/codex-mcp-env-forward

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes Codex agents never connecting to `buzz-dev-mcp` by enabling the MCP server for the codex runtime.

The codex runtime entry in `discovery.rs` had `mcp_command: None`. This propagated to `BUZZ_ACP_MCP_COMMAND=""` when spawning buzz-acp for a Codex agent, causing `build_mcp_servers` to return an empty list — no MCP server was ever configured, so `buzz-dev-mcp` was never started and Codex agents had no access to buzz tools. The Codex-native exec tool is seatbelt-sandboxed with network disabled, so the only way to run `buzz messages send` is through the MCP `shell` tool; without this fix, Codex agents could receive mentions but could never reply.

  • Set `mcp_command: Some("buzz-dev-mcp")` on the codex runtime (was `None`) to match the buzz-agent entry; `BUZZ_ACP_MCP_COMMAND` resolves to the binary path and `build_mcp_servers` produces a configured server with `BUZZ_RELAY_URL`, `BUZZ_PRIVATE_KEY`, and `BUZZ_AUTH_TAG` forwarded via the ACP `McpServer.env` field, bypassing Codex's parent-env scrub via the protocol
  • Leave `mcp_hooks: false` since codex-acp does not handle `MCP_HOOK_SERVERS` today; lifecycle hooks can be added in a follow-up once the adapter supports them
  • Add `codex_has_mcp_command` test that pins both `mcp_command` and `mcp_hooks` fields against regression

E2E verified: Thufir replied via `buzz messages send` through the MCP `shell` tool after applying this change in a `just staging` dev build.

@wpfleger96 wpfleger96 force-pushed the duncan/codex-mcp-env-forward branch from 3cd4cc9 to 21ecf09 Compare June 30, 2026 15:27
@wpfleger96 wpfleger96 marked this pull request as ready for review June 30, 2026 15:27
@wpfleger96 wpfleger96 force-pushed the duncan/codex-mcp-env-forward branch from 21ecf09 to 84b1bc7 Compare June 30, 2026 15:49
The codex runtime entry in discovery.rs had mcp_command: None, so
build_mcp_servers returned vec![] — no MCP server was ever configured
for Codex agents and buzz-dev-mcp was never spawned.

Set mcp_command: Some("buzz-dev-mcp") to match the buzz-agent entry.
This wires buzz-dev-mcp as a configured MCP server with BUZZ_RELAY_URL,
BUZZ_PRIVATE_KEY, and BUZZ_AUTH_TAG forwarded via the ACP McpServer.env
field, bypassing Codex's parent-env scrub via the protocol.

Leave mcp_hooks: false since codex-acp does not handle MCP_HOOK_SERVERS
today. Add codex_has_mcp_command test that pins both fields.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96 wpfleger96 force-pushed the duncan/codex-mcp-env-forward branch from 84b1bc7 to 8328e5a Compare June 30, 2026 16:05
@wpfleger96 wpfleger96 merged commit b74ed85 into main Jun 30, 2026
17 of 20 checks passed
@wpfleger96 wpfleger96 deleted the duncan/codex-mcp-env-forward branch June 30, 2026 16:08
wpfleger96 pushed a commit that referenced this pull request Jun 30, 2026
…work

* origin/main: (25 commits)
  fix(thread): stop mid-scroll content jump in live threads (#1397)
  fix(ci): restore main to green — tauri fmt, personas.rs file-size split, Windows path test (#1399)
  fix(desktop): enable buzz-dev-mcp MCP server for Codex agents (#1394)
  fix(ci): restore E2E flakiness fixes for pgschema, docker-pull, and spec timing (#1396)
  fix(personas): persist pack-backed persona UI edits across reboot (#1392)
  fix(buzz-acp): clear steer_rx on all run_prompt_task exit paths (#1391)
  Restore channel date divider rule (#1395)
  Speed up profile wave action (#1379)
  Restore visible links for rich previews (#1378)
  Mobile channel list polish (#1367)
  style(desktop): unify corner radii to rounded-2xl (16px) (#1393)
  fix(desktop): skip keychain write when blob contents are unchanged (#1377)
  fix(desktop): stop clipping the agent-activity row under the composer (#1371)
  Constrain macOS overscroll to conversations (#1317)
  Mobile appearance foundation (#1366)
  chore(release): release Buzz Desktop version 0.3.38 (#1375)
  feat(desktop): provider-agnostic model selection + databricks discovery (#1307)
  release(helm): buzz chart 0.1.1 (#1374)
  Harden relay attack surfaces (#1369)
  ci(helm): publish chart to GHCR on chart-v* tags (#1372)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant