Bug: Disabling Tools in config is not respected #919

Closed
opened 2026-02-16 17:28:46 -05:00 by yindo · 2 comments
Owner

Originally created by @sroidl-airup on GitHub (Jul 25, 2025).

Originally assigned to: @thdxr on GitHub.

Version Affected 0.3.67

Context
I created a custom mode - Chat - in which I purposefully disabled every tool. In this state, I expect the LLM to be a Chatbot without any context of my project. Eventually, I want to experiment with different MCP tools, so I want a mode which starts with zero tool access.

Issue
Although I disabled all tools per the config

{
  "$schema": "https://opencode.ai/config.json",
  "share": "disabled",
  "autoupdate": false,
  "mode": {
    "chat": {
      "tools": {
        "bash": false,
        "edit": false,
        "write": false,
        "read": false,
        "grep": false,
        "glob": false,
        "list": false,
        "patch": false,
        "todoread": false,
        "todowrite": false,
        "webfetch": false
      }
    }
}

When prompted with: List the top-level directories of the project, the agent can somehow execute the command anyways.

Expectation:
The agent should not have any access and tell me so.

Originally created by @sroidl-airup on GitHub (Jul 25, 2025). Originally assigned to: @thdxr on GitHub. **Version Affected** 0.3.67 **Context** I created a custom mode - Chat - in which I purposefully disabled every tool. In this state, I expect the LLM to be a Chatbot without any context of my project. Eventually, I want to experiment with different MCP tools, so I want a mode which starts with zero tool access. **Issue** Although I disabled all tools per the config ```json { "$schema": "https://opencode.ai/config.json", "share": "disabled", "autoupdate": false, "mode": { "chat": { "tools": { "bash": false, "edit": false, "write": false, "read": false, "grep": false, "glob": false, "list": false, "patch": false, "todoread": false, "todowrite": false, "webfetch": false } } } ``` When prompted with: `List the top-level directories of the project`, the agent can somehow execute the command anyways. **Expectation:** The agent should not have any access and tell me so.
yindo closed this issue 2026-02-16 17:28:46 -05:00
Author
Owner

@thdxr commented on GitHub (Jul 25, 2025):

you can see it literally executing the command? or just that it's able to answer? it's able to enaswer this because we do return some environment info in the system prompt which isn't possible to disable right now

@thdxr commented on GitHub (Jul 25, 2025): you can see it literally executing the command? or just that it's able to answer? it's able to enaswer this because we do return some environment info in the system prompt which isn't possible to disable right now
Author
Owner

@sroidl-airup commented on GitHub (Jul 28, 2025):

I did another try and it seems that it took the information from the system prompt.
Only after switching to the PLAN mode, it could access the README.md

Refer to this session on the opencode repository.

I'll close the issue as it seems to work as intended.

@sroidl-airup commented on GitHub (Jul 28, 2025): I did another try and it seems that it took the information from the system prompt. Only after switching to the PLAN mode, it could access the README.md Refer to [this session](https://opencode.ai/s/a4ZF2v4D) on the opencode repository. I'll close the issue as it seems to work as intended.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#919