feat(a2a): add ACP session management and token usage tracking to A2A server

Resolved 💬 5 comments Opened Feb 17, 2026 by tripleyoung Closed May 10, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

Feature request

Problem

The Codex A2A server currently lacks support for ACP (Agent Client Protocol) session management and token usage tracking. ACP clients have no visibility into token consumption during Codex sessions.

Proposed solution

  • Add ACP session lifecycle management to the A2A server
  • Integrate token usage tracking via bespoke event handling
  • Enhance the MCP server A2A handler with unified tool discovery
  • Add session-aware HTTP transport routing

Use case

Enables Codex to work as an ACP-compatible agent, supporting real-time token usage monitoring and multi-turn session management.

Additional context

I have a working implementation with changes across 8 files in codex-rs/a2a and codex-rs/mcp-server. All changes pass cargo check and are backward-compatible.

View original on GitHub ↗

5 Comments

spider-yamet · 6 months ago

I would like to work on this issue.

etraut-openai contributor · 6 months ago

@spider-yamet, please refer to our contribution guidelines.

ThinkOffApp · 5 months ago

We've implemented ACP session management in IDE Agent Kit (v0.4.0), extending standard ACP to support multi-agent, multi-IDE coordination.

Our implementation adds:

  • N-agent, N-IDE support — standard ACP is 1:1, we coordinate multiple agents (Claude Code, Codex, Gemini) across machines via shared rooms + ACP sessions
  • Cross-service message projections — task receipts visible across multiple platforms (Ant Farm, xfor, AgentPuzzles)
  • Operational policy layer — token-gated allowlists, per-session message caps, timeout enforcement, receipt trail on denied requests
  • OpenClaw fleet bridge — ACP handles task routing, OpenClaw agents handle execution

CLI: ide-agent-kit acp spawn|list|status|send|close
Webhook: POST /acp with token auth

Tested with 3 IDE agents coordinating in real-time with sub-10s response times. Happy to share implementation details or collaborate on the ACP session spec.

Release: https://github.com/ThinkOffApp/ide-agent-kit/releases/tag/v0.4.0

A-F-V · 5 months ago

FYI, there are these existing adapter implementations:

etraut-openai contributor · 3 months ago

This feature request hasn't received enough upvotes, so I'm going to close it.