Tool result size cap (~25K tokens) blocks round-tripping large MCP tool payloads

Resolved 💬 4 comments Opened Apr 9, 2026 by danielrdc Closed May 22, 2026

Bug: Harness truncates tool results well below available context capacity

Tool results over ~25K tokens are automatically persisted to a file and replaced with a 2KB preview, even when the model's context window has ample remaining capacity. This is a harness-level decision — the model never sees the full result, so it cannot pass that data back as a parameter to another tool call.

This is not a model limitation. The context window (200K+ tokens) can handle these payloads. The harness intercepts and truncates the result before the model ever sees it.

Reproduction

Using the Atlassian MCP server's getConfluencePage and updateConfluencePage tools to make surgical edits to a Confluence page:

  1. Fetch a page with ~80 table rows → ADF body is ~300KB / ~160K tokens
  2. Tool result is auto-persisted to file; model sees only a 2KB preview
  3. Model cannot pass the full ADF back to updateConfluencePage because it never received it

The same workflow succeeds on smaller pages (~20KB). The only difference is page size.

Expected behavior

The harness should not truncate tool results that fit within the model's available context window.

Current behavior

A hardcoded ~25K token cap on tool results causes truncation regardless of available context. This cap is not user-configurable.

Environment

  • Claude Code CLI
  • Atlassian MCP server (https://mcp.atlassian.com/v1/mcp)
  • Affected page: ~300KB ADF / ~160K tokens / ~80 table rows

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗