claude-code - 💡(How to fix) Fix [FEATURE] Disable and/or hide build in tools [2 comments, 2 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#48766Fetched 2026-04-16 06:51:34
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2renamed ×1

Code Example

DISABLE_SLASH_COMMANDS=/add-dir,/copy
HIDE_SLASH_COMMANDS=/install-slack

---

DISABLE_INSTALL_SLACK_COMMAND=1
HIDE_REVIEW_COMMAND=1
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Currently there is no clear way to disable and/or hide the build in tools. The list of tools searchable via / contains so many tools which not useful in every project or situation but are loaded into the context.

Even if it is a good change to discover and invoke tools via the Skill tool which will only load them into context on demand the issue still persists that not every build in tool should be available (v2.1.108): The model can now discover and invoke built-in slash commands like /init, /review, and /security-review via the Skill tool

The current strategy is really confusing. Sometimes a new tool is added without any way to disable it, sometimes a new tool and a config key is added but the key never mentioned in the change log and sometimes a new tool is added and its config key is mentioned in the change log.

Proposed Solution

Environment variables following the existing DISABLE_BUG_COMMAND=1 pattern:

DISABLE_SLASH_COMMANDS=/add-dir,/copy
HIDE_SLASH_COMMANDS=/install-slack

or

DISABLE_INSTALL_SLACK_COMMAND=1
HIDE_REVIEW_COMMAND=1

Alternative Solutions

Support two levels of command management via permissions config:

deny — Completely disables command (Claude cannot invoke it; users cannot access it) {"permissions": {"deny": ["/add-dir", "/copy", "/risky-command"]}}

hide — Removes from UI for visual cleanup, but Claude can still invoke if needed {"permissions": {"hide": ["/install-slack", "/quick-open", "/do-something"]}}

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

Teams in restricted environments want to prevent risky operations (disable commands) while simplifying the UI without removing features Claude might use autonomously (hide less-common commands). This mirrors how permissions.deny already works for tools/subagents extending the pattern to slash commands, skills and harness tools.

Additional Context

Issue #16758 was a similar idea.

extent analysis

TL;DR

Implement environment variables or a permissions config to disable or hide built-in tools and slash commands.

Guidance

  • Consider using environment variables like DISABLE_SLASH_COMMANDS or HIDE_SLASH_COMMANDS to control the visibility and availability of built-in tools and slash commands.
  • Alternatively, explore implementing a permissions config with deny and hide levels to manage command access and visibility.
  • Review the proposed solution and alternative solutions to determine the best approach for your specific use case.
  • Evaluate the trade-offs between using environment variables versus a permissions config, considering factors like flexibility, scalability, and maintainability.

Example

# Example environment variable usage
DISABLE_SLASH_COMMANDS=/add-dir,/copy
HIDE_SLASH_COMMANDS=/install-slack

Notes

The solution will depend on the specific requirements and constraints of your project, including the version of the software and the existing configuration.

Recommendation

Apply a workaround using environment variables, as it seems to be a straightforward and flexible solution, allowing for easy customization and control over built-in tools and slash commands.

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

claude-code - 💡(How to fix) Fix [FEATURE] Disable and/or hide build in tools [2 comments, 2 participants]