You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ask bar fails with "Prompt is too long" when the user has many MCP servers — spawn claude with --strict-mcp-config #66
On a machine with a large global MCP roster (claude.ai connectors + plugins), every Ask-bar question fails immediately with "Prompt is too long". The map itself is innocent — floorplanAskInstructions is ~1.2 KB — but serve.mjs spawns claude -p in the codebase root, and that session inherits the user's full MCP configuration. The tool schemas alone can exceed the model's context before the question is even added.
Measurements (Windows, Claude Code CLI 2.1.316, floorplan 0.6.2)
claude -p "Say just OK" --output-format json --model haiku
→ input + cache ≈ 832,000 tokens (MCP tool schemas dominate)
claude -p "Say just OK" --output-format json --model haiku --strict-mcp-config --mcp-config '{"mcpServers":{}}'
→ ≈ 32,000 tokens
With the default model the first form overflows the context window, so the Ask bar surfaces the API error verbatim.
Suggested fix
Ask answers only ever use Read/Grep/Glob and node floorplan/query.mjs, never MCP tools, so claudeRun() in assets/serve.mjs can safely opt out of MCP:
Patched locally this way: Ask works again end-to-end, answers stream normally, and each question is ~25× cheaper as a side effect. The Codex path may deserve an equivalent (its sandbox config), though I haven't measured it.
Correction on the numbers after digging deeper: the 832k reading was a genuine single-request measurement (cache_creation=832,020 — the CLI had inlined every MCP tool schema; toolSearchAbsent: true in its logs). However it doesn't always reproduce: later runs on the same machine/version defer MCP tools behind ToolSearch and start at ~110k, apparently a server-side rollout. So the failure is intermittent — whenever the CLI inlines schemas, a large MCP roster still overflows the Ask run's context. The suggested --strict-mcp-config opt-out remains the reliable fix (and drops even the deferred-mode baseline from ~110k to ~32k per question).
Fixed in 0.9.0: questions on the map now run with no MCP servers loaded (which also makes each one much cheaper), and with @psingh-valorx's #120 Claude Code is told not to read the map's own generated files. Codex has no switch that turns off only its MCP servers, so it still loads them. Thanks for reporting it.
Update with claude plugin update floorplan@floorplan.
Activity
Kadreev commentedon Nov 2, 2026
Correction on the numbers after digging deeper: the 832k reading was a genuine single-request measurement (cache_creation=832,020 — the CLI had inlined every MCP tool schema;
toolSearchAbsent: truein its logs). However it doesn't always reproduce: later runs on the same machine/version defer MCP tools behind ToolSearch and start at ~110k, apparently a server-side rollout. So the failure is intermittent — whenever the CLI inlines schemas, a large MCP roster still overflows the Ask run's context. The suggested--strict-mcp-configopt-out remains the reliable fix (and drops even the deferred-mode baseline from ~110k to ~32k per question).Merge #120 from psingh-valorx: keep the Ask agent out of the map's ge…
Ask through Claude Code without the person's MCP servers
haydenschmitty commentedon Nov 15, 2026
Fixed in 0.9.0: questions on the map now run with no MCP servers loaded (which also makes each one much cheaper), and with @psingh-valorx's #120 Claude Code is told not to read the map's own generated files. Codex has no switch that turns off only its MCP servers, so it still loads them. Thanks for reporting it.
Update with
claude plugin update floorplan@floorplan.