Skip to content

devstack mcp: passed-on upstream instructions exceed Claude Code's 4096 characters, later upstreams are cut off #456

Closed

Description

@7schmiede

Problem

Since 0.39.0 devstack mcp passes the upstreams' MCP instructions on in its own initialize result: devstack's text first, then one ## \__` (MCP server ...) section per upstream, each capped at 4000 characters. The sum has no cap. Claude Code keeps at most 4096 characters of a server's instructions and cuts the rest (… [truncated]`). Every upstream whose section starts after character 4096 never reaches the agent, and one before it may be cut in the middle.

The upstreams that most need their instructions are often the small, in-house ones: a routine the agent must follow in every session, kept in the instructions so it stays in context even when the client drops the matching skill from its listing. Those come last here.

What I saw

devstack 0.39.0, Windows 11, Claude Code 2.1.312. A pool with three upstreams that send instructions: Linear's hosted MCP, GitHub's, and an own small server.

The initialize result of devstack mcp (sent by hand over stdio) has 7307 characters of instructions:

Offset Section
0 devstack's own text (about 1450 characters)
1450 ## \linear__` ...` (about 2980)
4428 ## \github__` ...` (about 1890)
6313 ## \__` ...` (about 990)

In a Claude Code session the server's instructions end at character 4096, in the middle of the Linear section, with … [truncated]. The GitHub section and the own server's section are missing. A fresh claude -p session, asked to quote the own server's section, answers that it only has devstack's and Linear's instructions.

Expected

What the agent gets fits the client's budget and includes every upstream's instructions, or at least says which ones were left out. A short in-house routine should not be lost behind a long public server's text.

Ideas

  • Keep the whole text under 4096 characters (the smallest limit known; a setting if other clients differ). Fill it in an order that does not depend on how long each text is: devstack's own text, then each upstream gets a fair share (budget / n), and a share one does not use goes to the others.
  • Or put short sections first, or let the pool admin set an order or priority per upstream (devstack pool upstreams).
  • Where a section is cut or dropped, say so in one line (instructions of \github__` shortened, full text: ...), and offer the full texts some other way, e.g. an MCP resource or a tool instructions(prefix)`.
  • devstack doctor (or the dashboard) could warn when the passed-on instructions exceed the budget, naming the upstreams that do not fit.

Possibly related (not verified)

An upstream that was redeployed with new instructions still showed its old text in a new session through the same hub (the hub had been running since before the deploy). If the hub fixes the upstream instructions when it connects, a note in the docs or a refresh on reconnect would help. I have not restarted the hub to confirm.

Activity

  1. added a commit that references this issue on Nov 6, 2026
    9268878
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions