Skip to content

perf(mcp): reduce CLI discovery and response overhead - #1384

Merged
yyjeqhc merged 3 commits into
mainfrom
cli-mcp-token-economy
Nov 7, 2026
Merged

yyjeqhc merged 3 commits into
mainfrom
cli-mcp-token-economy

Conversation

@yyjeqhc

@yyjeqhc yyjeqhc commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Summary

Reduce tool discovery and response text overhead for the opt-in execution-only MCP CLI surface without changing the canonical Runtime execution, authorization or durable Job lifecycle.

  • Keep a focused direct CLI tool inventory (8 tools with a default Project, plus the Project picker without one); discover advanced admitted tools and complete input schemas through read_tool_manifest and call_runtime_tool.
  • Compact common CLI text surfaces while preserving exact Project selectors, read revisions, error/recovery evidence and Job continuation calls. Synchronous command head/tail previews adjust only the CLI log-page cursor; server-owned Job state and replay safety remain unchanged.
  • Clarify CLI routes and protected edit-path errors; cover normal, pending, truncated, failed and outcome-unknown execution states.
  • Extend the local-agent comparison harness with deterministic client-inventory probes, per-call output/usage accounting, and discovery size assertions. Paid live-model E2E was not run during this review.

Review follow-up

  • 161ccfe95 fixes discovery size accounting to use actual UTF-8 JSON wire bytes instead of Python's default ASCII-escaped Unicode representation. Added a multilingual regression.

Validation on special

  • Rust CLI-related library tests: 216 passed, 0 failed, 1 ignored by configuration.
  • MCP tool-description consistency regression: 1 passed.
  • Python local-agent metrics fixtures: 5 passed.
  • python3 scripts/check_markdown_links.py: 279 files, 1,505 local links, none missing.
  • cargo fmt --all -- --check and git diff --check: passed.
  • Full workspace production dogfood check: 0 warnings, Cargo exit 0.

No deploy, restart or merge is included.

@yyjeqhc
yyjeqhc merged commit d8e437b into main Nov 7, 2026
18 checks passed
@yyjeqhc
yyjeqhc deleted the cli-mcp-token-economy branch November 7, 2026 02:29
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