Repository navigation
Closed
Labels
enhancementNew feature or requestgood first issueGood for newcomersproviderModel provider / backend support
Description
Summary
MandoCode currently talks to models directly (Ollama via Microsoft Agent
Framework). I'd like to propose an optional ACP client mode, so MandoCode
can also drive external coding agents (Claude Code via an ACP adapter,
Gemini CLI, Copilot CLI, Cline, ...) as subprocesses over stdio. This
complements the Claude / Foundry / OpenAI provider work planned for
v0.17.0 rather than replacing it.
Why
- Allows to use not the API only but also the subscription.
- Auth stays in the native tool: the user logs in with
claudethemselves,
MandoCode never touches their credentials/tokens. - One integration gives access to many agents.
Protocol notes (as of Nov 2026)
- Target ACP v1 (current stable). v2 is still a Draft and breaks parts
of v1 (fs/terminal client APIs removed, new prompt lifecycle), so I'd
gate it behind version negotiation later. - Transport: JSON-RPC 2.0 over stdio (NDJSON). Remote HTTP/WebSocket is
only a draft RFD, out of scope. - Flow: initialize -> (authenticate) -> session/new | session/resume
-> session/prompt, with streamed session/update notifications and
session/cancel.
Implementation
- MandoCode ships net10.0 and net8.0 builds, so the library must support
net8.0. Candidates (all community, none official):- LibAcp (net8.0/net10.0, covers stable v1 incl. resume/list/close)
https://github.com/sargeMonkey/libACP
https://www.nuget.org/packages/LibAcp - nuskey8/acp-csharp (
AgentClientProtocolon NuGet)
https://github.com/nuskey8/acp-csharp
https://www.nuget.org/packages/AgentClientProtocol - SvcSystems.AI.AgentClientProtocol (claims NativeAOT-compatible, but
targets net11.0 and is alpha, so not usable yet)
https://github.com/IvanJosipovic/SvcSystems.AI.AgentClientProtocol
- LibAcp (net8.0/net10.0, covers stable v1 incl. resume/list/close)
- Alternative: a thin client generated from the official
schema.json with System.Text.Json source generation. ACP's client side
is small (about 15 message types), and this avoids depending on an
early-stage package. Worth verifyingsession/updatepolymorphism
handling either way. - Note: Native AOT isn't required by MandoCode today, but a
JsonSerializerContext-based approach keeps the door open.
Out of scope (for now)
- ACP agent mode (exposing MandoCode to editors)
- ACP v2, remote HTTP/WebSocket transport
TUI/CLI examples:
- Toad
- acpx (CLI)
- Hydra
- Martty — extensible Rust/ratatui terminal client for DeepSeek Harness and other ACP-compatible agents
- Nori CLI
- pool
- SpurCode — Rust-native terminal orchestrator that runs a mixed fleet of ACP agents (Claude Code, Codex, Gemini, Kimi, OpenCode and more) in parallel across Git worktrees, from one TUI
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestgood first issueGood for newcomersproviderModel provider / backend support
Activity
DevMando commentedon Nov 9, 2026
@TeseySTD
Hey! This is a great suggestion. I wasn’t familiar with ACP before you brought it up, so I took some time to look through the proposal and documentation. Thanks for including the protocol details, library options, and examples. They helped me see how this could fit into MandoCode.
Here’s what I’m thinking for integrating it into the current workflows and UI.
Setup and management
I’m leaning toward a dedicated
/agent-acpcommand. It would open a picker to select a configured external agent, add a connection, or manage existing connections. Settings would expose the same configuration screen.Connection setup would include a display name, launch command or adapter, arguments, and a connection check. Authentication would stay with the external tool’s supported flow. We’d verify authentication and subscription support for each integration.
Disconnecting an agent, closing a conversation, and removing a saved configuration would be separate actions. Removing a configuration shouldn’t silently terminate sessions, uninstall the tool, or delete its history.
Continuing an existing conversation
If someone is already working with a native MandoCode agent, selecting an external agent through
/agent-acpwould offer:For an empty conversation, it would connect and wait for the first prompt. Running the command alone wouldn’t send context or start work.
I’d like this transition to happen within the same tab or pane, with a clear transcript marker showing where the agent changed. Underneath, these would remain separate sessions, with the original session preserved for recovery.
The user could then watch streamed replies and reported activity, answer permission requests, send follow-up prompts, and cancel work. The header would identify the active agent, model when available, and project folder.
Models and returning to MandoCode
I initially considered adding ACP to
/model, but keeping agent selection separate feels clearer.Within an ACP session,
/modelwould show model choices reported by that external agent, when supported. Returning to a native MandoCode agent would use an explicit context handoff, potentially within the same pane.That distinction matters because changing runtimes also changes the available tools, permissions, and session management.
Snapshots and collaboration
Context snapshots could provide a bridge between native and external agents. For example, a native agent could investigate a bug, capture its findings, and pass that recap to an external agent to continue. The same could work in reverse.
The snapshot would transfer useful context, rather than claim to transfer the agent’s internal state or permissions. Restoring an external agent’s original session would depend on its session-loading capabilities.
Later, external-agent conversations could appear alongside native agents in the
@picker. That would give us a familiar entry point for questions, reviews, and task handoffs while keeping each agent’s work visible in its own conversation.Things to account for
Before expanding the integration, I think we need clear behavior around:
Implementation approach
I’m thinking of approaching it in four phases:
Protocol and library validation. Start with one external agent and evaluate the compatible C# libraries against the schema-generated alternative. Verify .NET 8 and .NET 10 compatibility, streamed updates, permissions, cancellation, and shutdown. Keep the scope to ACP v1 over stdio.
Basic CLI support. Add configuration, connection testing,
/agent-acp, fresh sessions, streaming, permission handling, cancellation, and clear errors.Context and continuity. Add reviewed handoffs, transitions within the same pane, transcript markers, snapshots, and session restoration where supported.
Collaboration and Desktop. Extend supported
@interactions and bring the shared implementation into Desktop’s workspaces, tabs, and split views.That’s the direction I’m considering. I’d be interested in your perspective, particularly whether you’ve already tried either C# library and any lifecycle or rendering considerations you see from the RazorConsole side.
Which agent would you personally want to connect first? Would you mainly use it for fresh tasks or to continue work started with a native MandoCode agent? That would help shape the first integration and where context handoff fits in the phases.
Also, were you interested in working on an initial implementation? I’m happy to take it on or have you contribute, Either way, your research gives us a great starting point!! 😎
TeseySTD commentedon Nov 10, 2026
Thanks for the detailed plan, it looks great to me.
in through
claudeitself).MandoCode agent, so the context handoff in phase 3 matters to me.
lifecycle side of streamed updates and permission prompts.
On the libraries: I'd rather build a thin in-house client on ACP v1
(stdio, NDJSON) than depend on an early-stage community package. I'll
base the types on the official schema.json and keep the transport and
protocol layers separate, so a library can still be swapped in later if
it matures. I'll validate it with Claude Code in phase 1 (net8.0 and
net10.0, streaming, permissions, cancellation, shutdown).
DevMando commentedon Nov 11, 2026
@TeseySTD Awesome, sounds good to me! The thin in-house client approach makes sense, especially with transport and protocol kept separate so we have flexibility later.
Starting with Claude Code and validating those core flows on both .NET targets sounds like a solid first step. We can keep the initial PR focused on that foundation, then build the setup UI and context handoff on top.
It would also be helpful to capture which adapter and authentication setup you test with, so we can reproduce it.
I’ll focus on the direct-provider work in parallel. Thanks for taking this on! Looking forward to seeing it come together.
feat(acp): add MandoCode.Acp project with ACP v1 protocol types
DevMando commentedon Nov 13, 2026
Implemented in #140, with additional Codex support and session improvements in #142.
Thank you @TeseySTD for proposing this, researching the options, and contributing MandoCode’s ACP client! Really appreciate the work and collaboration. This gives us a great foundation to build on.
Closing this as completed. Context handoffs, deeper agent collaboration, and Desktop integration will be tracked separately as follow-up work.
Great work!!!! 😎 Much appreciated!