feat(cli): --no-builtin-tools / -nbt flag (#23)#244
Merged
Conversation
Adds a global flag that disables the built-in tool registry while keeping MCP server tools and extension tools (when extension framework lands). Useful for sandbox testing or strict-policy setups where the user wants a fully user-provided tool surface. Wiring: - src/cli/args.rs: --no-builtin-tools (alias -nbt) global flag. - src/cli/startup.rs: translate to JCODE_NO_BUILTIN_TOOLS=1. - src/tool/mod.rs::Registry::new: when env var truthy, skip both base_tools and the per-session subagent/batch/conversation_search tools. When active, jcode logs: JCODE_NO_BUILTIN_TOOLS=1 — skipping built-in tool registry (MCP + extension tools still load) so users can confirm the gate took effect. 2 new tests: - test_no_builtin_tools_env_disables_registry: env=1 produces empty registry - test_default_registry_has_builtin_tools: negative control Closes #23.
This was referenced May 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a global flag that disables the built-in tool registry while keeping MCP server tools and extension tools.
Behavior
When active, the Registry::new path:
base_tools()(read, write, edit, bash, grep, agentgrep, etc.)MCP and extension tools (added separately) still load.
Tests
Closes #23.