claude-code - 💡(How to fix) Fix [BUG] --tools "" still exposes LSP tool [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55019Fetched 2026-05-01 05:48:20
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
labeled ×6

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

LSP is still included if you use --tools and don't include it

What Should Happen?

Only tools specified in --tools should be included

Error Messages/Logs

Steps to Reproduce

If you run claude -p "List your available tools. Reply only with tool names." --strict-mcp-config --mcp-config "" --tools "" It replies LSP

You can still disable LSP with --disallowedTools, but that overwrites --tools, so you need to list every tool you don't want in --disallowedTools

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.75 is working, 2.1.76 has this bug

Claude Code Version

2.1.123

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can be worked around by using the --disallowedTools flag to explicitly exclude LSP, although this requires listing all unwanted tools.

Guidance

  • Verify that the --tools flag is correctly set to only include the desired tools, and that LSP is not included in the list.
  • Use the --disallowedTools flag to exclude LSP, but be aware that this will overwrite the --tools flag and require listing all unwanted tools.
  • Check the documentation for the --tools and --disallowedTools flags to ensure correct usage.
  • Consider testing with an earlier version (e.g., 2.1.75) to confirm the regression.

Notes

The root cause of the issue appears to be a regression introduced in version 2.1.76, but without further information, it's difficult to provide a more specific fix.

Recommendation

Apply workaround: use the --disallowedTools flag to exclude LSP, as this is the most straightforward way to mitigate the issue given the current version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING