Skip to content

Disabled tools can still be called by the agent #9122

Closed

Description

@yrenat

What happened?

If a tool is in settings.disabledTools, the agent can still call it, and the call still runs.

updateSettings saves disabledTools, and GET /api/agents/:id/system-info shows that tool as enabled: false. But sendMessage gives the model all tools:

const result = await generateText({
  ...
  tools: this.tools,

createTools() never checks disabledTools, so a disabled tool is still given to the model.

Example on main with claude-haiku-4.5. The agent was created with {"settings": {"maxSteps": 5, "disabledTools": ["executeOperator"]}}. system-info showed:

[{"name":"deleteOperator","enabled":true},{"name":"addOperator","enabled":true},
 {"name":"modifyOperator","enabled":true},{"name":"executeOperator","enabled":false}]

Prompt: "Add a CSV File Scan operator that reads the file data.csv, then call the executeOperator tool on it to run it." The agent called addOperator, then executeOperator({"operatorId":"op1"}), and the workflow really ran on the backend (it failed with FileNotFoundException, because the file does not exist).

Expected: tools in disabledTools should not be passed to generateText, or should be rejected when called.

Screenshots

Step 2, tool call: the agent calls executeOperator and it runs, even though system-info says enabled: false.

B-step2-toolcall.png

The chat and canvas: the agent added a CSV File Scan, ran it, and reported the error.

B-workspace.png

How to reproduce?

  1. Create an agent with POST /api/agents and "settings": {"disabledTools": ["executeOperator"]}. (The panel has no switch for this, so use the API.)
  2. GET /api/agents/<id>/system-info shows executeOperator with enabled: false.
  3. In the agent panel, send: Add a CSV File Scan operator that reads the file data.csv, then call the executeOperator tool on it to run it.
  4. Step 2's details show an executeOperator call and its result.

Version/Branch

1.4.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

57faa6b

What browsers are you seeing the problem on?

Chrome

Relevant log output

agent-service/src/agent/texera-agent.ts  sendMessage: generateText({ tools: this.tools }); createTools() does not check settings.disabledTools

Activity

  1. added theissue type on Oct 24, 2026
  2. shaynhornik commented on Oct 25, 2026

    @shaynhornik
    Contributor

    /take

  3. shaynhornik commented on Oct 25, 2026

    @shaynhornik
    Contributor

    I'll fix this by leaving tools listed in disabledTools out of the tool set passed to generateText, plus a test.

  4. chenlica commented on Oct 26, 2026

    @chenlica
    Contributor

    @shaynhornik Please cross link the issue and your PR.

    @yrenat You can be the first reviewer of the PR.

  5. shaynhornik commented on Oct 26, 2026

    @shaynhornik
    Contributor

    @chenlica Thanks, the PR is #9149 (it closes this issue). @yrenat, it's ready for review.

  6. chenlica commented on Nov 8, 2026

    @chenlica
    Contributor

    @yrenat Please review it.

  7. yrenat commented on Nov 8, 2026

    @yrenat
    ContributorAuthor

    Sorry for the delayed reply. I will review it ASAP once I have the bandwidth

    @yrenat Please review it.

  8. yrenat commented on Nov 10, 2026

    @yrenat
    ContributorAuthor

    @yrenat Please review it.

    @chenlica This PR looks good to me

  9. chenlica commented on Nov 15, 2026

    @chenlica
    Contributor

    @bobbai00 Please review it.

  10. added a commit that references this issue on Nov 16, 2026
    b516b2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions