Skip to content

Agent: serve MCP over ACP and model reasoning - #1618

Merged
AnthonyRonning merged 2 commits into
MaplePrivacyLabs:masterfrom
benthecarman:t3-acp-compat
Nov 17, 2026
Merged

AnthonyRonning merged 2 commits into
MaplePrivacyLabs:masterfrom
benthecarman:t3-acp-compat

Conversation

@benthecarman

@benthecarman benthecarman commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Makes maple-agent acp work as a local ACP provider in T3 Code. Two things were wrong, both on Maple's side.

T3 couldn't attach its MCP tools. T3 gives each session its own MCP server, t3-code, and picks the transport from the agent's capabilities. Maple advertised only http, and T3 uses HTTP only for agents it knows. So Maple got a stdio server, refused it, and session/new failed.

Maple now advertises mcpCapabilities.acp and serves {"type":"acp"} servers over the ACP connection itself:

  • Each MCP request becomes one mcp/message request, and the response carries the MCP result.
  • Notifications go as mcp/message notifications. Connections open with mcp/connect and close with mcp/disconnect, including after a failed handshake.
  • Each connection lasts as long as its ACP session. This works because the host runs both the ACP server and the tasks' MCP clients in one process.
  • Stdio servers are still refused. HTTP servers are unchanged.

The reasoning picker was empty for most models. T3 probes one session and reads the thought_level option only for that session's model. For every other model it reads the levels from the model's _meta in the session's models list, which Maple didn't send.

session/new and session/load now also return models.availableModels[]. Each model carries reasoningEfforts and reasoningEffort, or supportsReasoningEffort: false, in its _meta. The values come from the same per-model state the thought_level option uses. The model config option is still the selector: T3 builds its model list from that option and uses models only for the _meta, so the picker doesn't change or duplicate.

The commit also removes a stale proptest hash from the flake's cargoLock, which broke the nix build of the Agent package.

Testing

  • New tests:
    • A full ACP session where a task calls a tool on an acp server, checking the mcp/connect → initialize → tools/list → tools/call sequence.
    • Lower-level tests of the message transport, its error responses and the connection registry.
    • A test that a failed handshake releases its connection.
    • Per-model reasoning levels on session/new and session/load.
    • A stdio MCP server is still rejected, both directly and over the wire.
  • Gates: just ci-lint passes. just ci-test: 928 passed, 3 failed. The three failures are in login_path and two store::integrity checker tests. They fail the same way on master on the dev machine, so they come from that environment.
  • In T3 Code (v0.1.10-nightly.20261116.4761), against a host built from this branch before the handshake-failure fix:
    • A Maple thread saw T3's 71 t3-code tools and called one successfully.
    • All six models show their reasoning levels in T3's catalog.
    • The transport choice wasn't visible in any log. That the session used MCP over ACP rather than HTTP is inferred from T3's source: it always offers the acp server and picks it first once the agent advertises acp.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

T3 Code expects two things an ACP agent must provide on the v1
wire: MCP servers the editor itself serves ("type":"acp"), and
every offered model's reasoning levels in the session-setup
response, not only the current model's.

Advertise mcpCapabilities.acp and run {"type":"acp"} session MCP
servers through mcp/connect, mcp/message and mcp/disconnect on
the ACP connection: each inner MCP request becomes one
mcp/message request whose response carries the inner result.
The channels live as long as their session; a task that outlives
it cannot reconnect. Stdio servers stay refused; HTTP servers
are unchanged.

session/new and session/load now answer as raw JSON so they can
carry the v1 unstable `models` extension: every offered model
with reasoningEfforts and reasoningEffort, or
supportsReasoningEffort false, in its _meta, read from the same
thinking state the thought_level option uses.
The flake's cargoLock still pinned proptest 1.10.0 as a git
dependency, but the workspace lock has used proptest 1.12.0 from
crates.io since the monorepo integration. nix build of the
maple-agent package failed on the leftover hash, since no git
dependency matches it.

@AnthonyRonning AnthonyRonning left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally: lint and the full agent test suite pass on this branch merged with current master, and a live run against a local stack completed mcp/connect, tools/list and tools/call over ACP with all models and their reasoning levels returned.

@AnthonyRonning
AnthonyRonning merged commit a6f9a2b into MaplePrivacyLabs:master Nov 17, 2026
24 checks passed
@benthecarman
benthecarman deleted the t3-acp-compat branch November 17, 2026 22:34
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