Skip to content

perf(mcp): compact unknown capability run responses - #836

Merged
morluto merged 3 commits into
mainfrom
agent/compact-unknown-capability-run
Aug 8, 2026
Merged

perf(mcp): compact unknown capability run responses#836
morluto merged 3 commits into
mainfrom
agent/compact-unknown-capability-run

Conversation

@yuelgrace1810-ops

@yuelgrace1810-ops yuelgrace1810-ops commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Problem

A saved tool-first evaluation guessed a nonexistent math.run capability. The resulting UNKNOWN_CAPABILITY text repeated every installed capability ID and consumed 12,664 model-visible bytes before giving the normal recovery hint.

The equivalent math.find failure already keeps the full catalog in typed structured_content while projecting a compact text error.

Change

  • omit available_capability_ids only from the agent-facing math.run text projection for UNKNOWN_CAPABILITY;
  • preserve the complete typed result, diagnostics, assurance, and recovery hint;
  • add an MCP boundary regression proving the compact text stays below 2 KiB while the structured result retains the installed IDs.

On the observed trajectory, the bound guarantees at least 10,616 fewer visible bytes (83.8%).

Overlap and independence

This is independent of:

No mathematical operation, ranking, checker, scope, or assurance behavior changes.

Validation

After updating the branch to current main (including #834):

  • focused MCP boundary regression: passed;
  • full unit lane: 750 passed;
  • full lint/format/complexity/dependency/dead-code lane: passed;
  • component lane: 740 passed, 3 platform skips;
  • MCP lane: 38 passed; the one loopback-bind test blocked by the sandbox passed when rerun with loopback permission;
  • end-to-end lane: 8 passed, 1 expected Lean skip;
  • build: source distribution and wheel passed;
  • git diff --check: passed.

@morluto
morluto marked this pull request as ready for review August 8, 2026 17:33
@morluto
morluto merged commit 6ee93d8 into main Aug 8, 2026
61 of 66 checks passed
@morluto
morluto deleted the agent/compact-unknown-capability-run branch August 8, 2026 18:51
@morluto morluto changed the title Compact unknown capability run responses perf(mcp): compact unknown capability run responses Aug 24, 2026
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