Skip to content

Enable Codex peer-agent communication - #273

Merged
milind-soni merged 1 commit into
milind-soni:mainfrom
NuCl34R:codex/enable-codex-agent-comms
Aug 19, 2026
Merged

Enable Codex peer-agent communication#273
milind-soni merged 1 commit into
milind-soni:mainfrom
NuCl34R:codex/enable-codex-agent-comms

Conversation

@NuCl34R

@NuCl34R NuCl34R commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Mount the existing peer-agent stdio MCP integration on Codex turns.
  • Advertise agentsMcp support so the harness supplies Codex bots with the agents integration.
  • Add a Codex driver contract test covering MCP configuration, capability reporting, and comms-token hygiene.

Why

Codex already supports generic stdio MCP configuration, but its driver did not mount the agents integration or advertise the corresponding capability. As a result, a Codex-backed Chief of Staff could not use the existing list_bots, ask_bot, and delegate_bot tools.

This keeps depth limits, approval gates, authentication, and delegation execution in the existing harness and agents proxy.

How it was verified

  • pnpm typecheck
  • pnpm test
    • 1,073 main tests passed; 8 skipped
    • 2 broker tests passed
    • 12 updater tests passed
    • Packaged-server smoke test passed
  • Full Codex driver contract suite: 22 tests passed
  • Peer-agent orchestration suites: 62 tests passed
  • Independent read-only review: no findings

Screenshots (UI changes)

Not applicable. This change has no UI impact.

Checklist

  • pnpm typecheck and pnpm test pass locally
  • Server behavior changes come with tests (see CONTRIBUTING.md → Tests)
  • No dist-server/ edits (it's build output)
  • macOS-only code is platform-gated; no shell: true / cmd.exe string-building
  • No secrets in logs, responses, events, or argv

Summary by CodeRabbit

  • New Features
    • Codex now supports connecting to the agents integration through MCP.
    • Communication credentials are securely passed through the environment rather than exposed in command-line arguments.
    • Codex capability reporting now includes agents MCP support.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 87d2085a-b646-4a5a-89ca-a6c54deeec46

📥 Commits

Reviewing files that changed from the base of the PR and between fc0abab and a5fcdab.

📒 Files selected for processing (2)
  • server/drivers/codex.test.ts
  • server/drivers/codex.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The Codex driver now mounts an optional agents MCP integration during turn setup. The adapter reports agentsMcp support. Integration tests verify proxy arguments, token redaction, environment propagation, and successful turn completion.

Changes

Codex agents MCP integration

Layer / File(s) Summary
Mount the agents MCP server
server/drivers/codex.ts
When configured, the Codex driver mounts the agents integration with its command, arguments, environment variables, and approval settings.
Expose and validate capability support
server/drivers/codex.ts, server/drivers/codex.test.ts
The adapter reports agentsMcp: true. Tests verify proxy arguments, token handling, environment propagation, and turn completion.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to a5fcd

This localized change enables existing peer-agent communication for Codex and adds contract coverage. No actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant CodexDriver as Codex driver
  participant AgentsMCP as agents MCP server
  participant FakeAppServer as fake app server
  CodexDriver->>AgentsMCP: Mount the configured agents integration
  AgentsMCP->>FakeAppServer: Pass proxy arguments and process environment
  FakeAppServer-->>CodexDriver: Complete the turn successfully
Loading

Possibly related PRs

Suggested reviewers: milind-soni, aivsomkar, maxkongerskov

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: enabling peer-agent communication for Codex.
Description check ✅ Passed The description covers the required sections, explains the change and rationale, documents verification, and completes the checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@NuCl34R
NuCl34R marked this pull request as ready for review August 19, 2026 23:11
@milind-soni

Copy link
Copy Markdown
Owner

Neat. Bringing it in

@milind-soni
milind-soni merged commit a99cc70 into milind-soni:main Aug 19, 2026
6 checks passed
@milind-soni milind-soni mentioned this pull request Aug 21, 2026
1 task
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.

2 participants