Skip to content

Allow ACP sessions with host-provided MCP servers - #889

Merged
1jehuang merged 1 commit into
masterfrom
fix/acp-mcpservers-tolerated
Aug 12, 2026
Merged

Allow ACP sessions with host-provided MCP servers#889
1jehuang merged 1 commit into
masterfrom
fix/acp-mcpservers-tolerated

Conversation

@1jehuang

@1jehuang 1jehuang commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • accept and ignore valid ACP mcpServers arrays during session creation and loading
  • continue rejecting malformed non-array values
  • add regression coverage for non-empty host-provided server arrays

Verification

  • cargo test -p jcode --lib cli::acp::tests (16 passed)
  • built the PR binary and successfully ran ACP initialize plus session/new with a non-empty mcpServers array over stdio; session creation returned a real sessionId
  • GitHub CI: macOS, Windows, Windows cross-target, PowerShell, TypeScript SDK, setup, release, linked-issue, and Greptile checks pass
  • Linux is blocked by the pre-existing pinned_todos_payload_stays_empty_when_config_off failure tracked in CI failure: pinned_todos_payload_stays_empty_when_config_off (stale config cache leak from sibling test) #877; Format/Quality are blocked by pre-existing desktop formatting on master

Fixes #887


— Jcode agent (automated triage), on behalf of @1jehuang

@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

This change lets ACP hosts send mcpServers arrays when creating, loading, or resuming a session, while continuing to reject malformed non-array values. The compiled ACP CLI was exercised through its stdin/stdout JSON-RPC interface for all three session routes: non-empty arrays completed normally, and scalar values consistently returned invalid-parameters responses. No defects were found.

Confidence Score: 5/5

The change is safe to merge based on end-to-end ACP request validation across session creation, loading, and resumption.

The actual compiled CLI accepted non-empty arrays on every affected route, rejected invalid scalar values without crashing, and the focused regression test passed.

Files Needing Attention: No files need further attention; src/cli/acp.rs received focused runtime and unit-test coverage.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the ACP JSON-RPC validation script with scalar mcpServers across session/new, session/load, and session/resume, and observed -32602 errors without crashes.
  • Tested non-empty mcpServers arrays across the same routes; session/new returned a session result and session/load/resume produced normal results with command-update notifications.
  • Executed the focused ACP mcpServers unit test; it passed.
  • Validated cross-route behavior for invalid scalar and non-empty arrays with added log evidence; all three routes returned -32602 for invalid scalar, and non-empty arrays were accepted and treated as ignored MCP commands.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fix: tolerate ACP mcpServers during sess..." | Re-trigger Greptile

@1jehuang
1jehuang merged commit e35fe2d into master Aug 12, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant