Skip to content

Send Op::Connectors before Op::Start/Op::Open so ACP agents receive mcpServers on startup - #386

Merged
d41sys merged 1 commit into
mainfrom
fix-acp-connectors-order
Dec 4, 2026
Merged

d41sys merged 1 commit into
mainfrom
fix-acp-connectors-order

Conversation

@d41sys

@d41sys d41sys commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • In Core::ensure_engine (appd/src/core.rs), send Op::Connectors before Op::Start / Op::Open.
  • Previously, agentcore acp handled Op::Start immediately by sending ACP session/new / session/load with mcpServers: self.servers(), which was empty until Op::Connectors arrived afterward. As a result, installed ACP agents missed both user connectors and Bate's per-bot bate loopback MCP bridge on their initial session.
  • Added an ordering assertion (connectors before start in ops.log) to loopback_mcp_bridge_authenticates_enforces_approvals_and_shuts_down in appd/tests/service.rs.

Evidence

  • Caught during live end-to-end product testing against compiled appd + real agentcore acp + mock ACP agent binary: before this fix, session/new received mcpServers: []; after this fix, session/new receives the bate loopback MCP bridge and completes the full 401 auth check -> tools/list -> memory_write (Needs you approval card) -> memory_read flow (all 8/8 live smoke checks passed).
  • Full 4-step gate passed cleanly in this worktree:
    • cd window/ui && npm ci && npm run build && npm test
    • cargo fmt --all --check
    • cargo clippy --workspace --all-targets --locked -- -D warnings
    • cargo test --workspace --locked

Merge Danger

  • Low: 2-line startup op reorder in appd/src/core.rs plus a regression assertion in appd/tests/service.rs. Built-in agentcore handles Op::Connectors before Op::Start cleanly, and all existing appd, agentcore, native, proto, and UI tests pass unchanged.

Device decision

  • No window protocol or LAN surface changes; existing paired-device permissions are unchanged.

In Core::ensure_engine, Op::Start/Op::Open was sent before Op::Connectors.
When using an installed ACP agent (agentcore acp), Op::Start immediately
sends ACP session/new or session/load with the connectors received so far,
so the first session started with mcpServers: [] and missed both user MCP
connectors and Bate's per-bot loopback MCP bridge.

Send Op::Connectors before Op::Start/Op::Open so ACP agents receive the
full mcpServers list on startup, and assert that connectors precedes start
in appd's loopback MCP bridge service test.
@d41sys
d41sys merged commit 6f2bda8 into main Dec 4, 2026
5 checks passed
@d41sys
d41sys deleted the fix-acp-connectors-order branch December 4, 2026 20:22
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